Now that I have #Eleventy v3 installed, I finally implemented the 11ty image optimization plugin.
-
Now that I have #Eleventy v3 installed, I finally implemented the 11ty image optimization plugin. The before and after is pretty striking. I have an image-heavy site at Cybercultural.com, so in one of the latest posts the amount transferred to the user is 4 times less! 800kb vs 3.2MB before. Also, it doesn't all download at once — that's 800kb only if the user reads the whole post (which I hope they do, of course).
-
Richard MacManusreplied to Richard MacManus last edited by
It's even better for the homepage, which is now over 6 times less load.
-
Mike Riversdalereplied to Richard MacManus last edited by
@ricmac how does that work, aren't images all compressed anyway or does it weave magic and give small images for small screens etc?
-
Richard MacManusreplied to Mike Riversdale last edited by
@miramarmike Images typically aren't compressed anyway. Previously I had been using a service called Cloudinary to automatically compress images. That worked ok, but eventually I would've had to pay for it. In my current (free) solution, Eleventy automatically creates optimized images during my build process — i.e. before it's uploaded to my host, Cloudflare. It uses this image processor: https://sharp.pixelplumbing.com/. There are also manual ways to compress images, e.g. https://squoosh.app/