[SOLVED] Defer image loader

Please Log in or Create an account to join the conversation.

#
Hello and congrats for your work.
Is it possible to change the base64 image with a one that i host on my server?

Please Log in or Create an account to join the conversation.

#
Hello, Teo.

Thank you.

Yes, just try to put image url in the plugin parameter 'Loading Image (base64 encoded)'.

Please Log in or Create an account to join the conversation.

#
Thank you for the reply, is there a way to add a preloading image that would be responsive?
I mean that if i use a .jpg image with fixed width and height the preloader will mess up the website.

Please Log in or Create an account to join the conversation.

#
Hello, Teo.

In case with css backgrounds, it is possible to fix with background-size: contain; property.

In case with <img> tags, you can try to apply object-fit: contain; property.
Read more here - css-tricks.com/almanac/properties/o/object-fit/

Please Log in or Create an account to join the conversation.

#
Good thing with base64 image is that is resizing well but the code that it produces in a site with many images is huge.
I'll try to find a way to use custom loader image that will resize. Maybe an .svg image as loader will be a good solution.
I'll try to make it work and let you know.
Thank you again

Please Log in or Create an account to join the conversation.

#
The best way for this is to save the png image that is used on base4 code and upload it on my server and use it.
Regards