liamfiddler / eleventy-plugin-lazyimages

Eleventy plugin that adds blurry placeholders & lazy loading to your images
MIT License
139 stars 29 forks source link

png base 64 image are less compressed #32

Closed ixartz closed 4 years ago

ixartz commented 4 years ago

I have update my eleventy plugin lazyimage to the latest version and it seems my png base 64 of this image: https://creativedesignsguru.com/demo/Eleventy-Starter-Boilerplate/assets/images/posts/error.png has become bigger.

The old version: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAB90lEQVR4AU3BzUsUYQDA4d8748666q5WC36M62poYpaXIOjjEHQoiIqgPEY37dChDl4KKfoDokMUQV+XyK6Gx4SisIKkRUJcE0tCSvZjxp2Z3Zl337c9eOh5BDtGgf2Q9GPW+JhhHtnT1Rn6PT25j18+z8ekXJkFTYOg4RKQTrUfPNHT+7o/1T5sD2RFKpVCCKGLnhc++LTw+N5q/noEdfM2sGqY9tTR4+8O2PZAd39WxGMWWim0qgtLiKZjmcxho1AIHdd9b7wAzg4O3e1tae2OtSSQVpxtyyL0PUKl8U6fInBccXJg77VBaDNs2NVnmBfcakC14qGzfXRM32Q70Uzi6gRbb+cJKxW6EJ1VyxpuGjLMwaBUbo/SaZAS/80cySgk++ghK0+fYS1+w1MKWZfYmoTRolTT31KRWsUjKDv4rku1UKS0kidz/hzB7g78cplCoShzUm4aefS6G0XBdqlE4DiIrk6ar1wmd3GcjVvTpCYn8ByHXKm4rLX6Zf4ArxvGMkqPWkoRH9nH+stXsLaOu/Sd4uwsNb+qn1S9KRu9aNLwE72QlPJMf12lg+U8+vcm9SiiHkVEYcSMrM3Moe4sgTZpqIG7qtXMloxiSaVGWpWKR1qxhnKfa3n/A/qGByENgv+0gchAXyscqoH6A1892PBAs+Mfoyn2MCSbBxYAAAAASUVORK5CYII=

the new one: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAACXBIWXMAAAsSAAALEgHS3X78AAAIK0lEQVRIx1VWCVSURxLuf+YfZmA4lNM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cKTW28rqkNtXRxvaMT1ixxhmsLF4FMrAVVqppwVaQBlUJ1lKmIQaaiBmUCVTzHiia+4qvIMvmC5HUMo/TihoBm/BOErySiSWZeCmEiMhj2h1xWJP9eKH5boaqBVSJ1qKQiE4qhggMUqCEVqGBVoYIvAhmVUr4Iz/JUJo8ygtt7GHZnIuHZz5RjL+7j8L6e8GlNN00gTMx2HvtdNl/l4Xes6NdigSrIWFWspKAcoIwnhAoqMoZqRgWLGQGcYgQv/0nYpl2EvzeZMJ409apzgNuUSWu69K+aZqFD1ocQk0jChKQx/H1ZDFtxlCd4fJIRTJ5nBHiFgpYotQDPEwGeJOx/vyJs3z7CL6d7ujN2ikCLw/ptOvlOvVIIMxOu2fJiRlMNrc7O1KvEzwgv9++EX5pD+G2HCfskj7ADnD5E+Hfp7+U7CC8vhfASV9KgGHIesEKCzOzDhXuUkGmKqWZL/q+x8wkxoGTuMYSJ+4RamkF4BzlSekAO0PEOank8fed4mRMiIdN7gNN7zDUTKo4fDhKn+xof9Gf2ihqiNZfuFyV1pHNd6dF0oDHhnjdayqLE01ROTPlgkbaScKr9D0AF2YvgvvzwAAAAAElFTkSuQmCC

I suppose the switch from JIMP to sharp increase the file size ?

My old version was "eleventy-plugin-lazyimages": "^1.1.2", and now it is "eleventy-plugin-lazyimages": "^2.0.1",

liamfiddler commented 4 years ago

:wave: Hi @ixartz

Yes, that's correct. The default resolution of the LQIP was increased in v2.

Setting maxPlaceholderWidth and maxPlaceholderHeight to 12 will restore the previous settings and your placeholder image will reduce in size.

ixartz commented 4 years ago

Hi @liamfiddler thank you for your quick response. Now, I understand the reason. Definitively, love this v2. Even if it did some unpleasant surprise but it support webp ;)

liamfiddler commented 4 years ago

I'll close this issue because it seems to be resolved. Feel free to reopen if I'm mistaken.