liamfiddler / eleventy-plugin-lazyimages

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

Handling Unsplash querystring format #34

Closed FailedSitcom closed 4 years ago

FailedSitcom commented 4 years ago

Hello Liam,

I've recently been using Ghost as a headless CMS, and found that when I tried using it with their Eleventy starter theme the build would fail whilst processing images. After doing a little digging, I found that Unsplash abbreviates "format" to "fm" inside the query string (so was causing the file extension to be set as null).

So my pull request is a small adjustment that follows on from this previous pull request, which allows for the format to be passed via the URL:

https://github.com/liamfiddler/eleventy-plugin-lazyimages/pull/16

Thank you for the amazing plug-in, and please let me know if you require any changes to my suggestion.

Samuel

liamfiddler commented 4 years ago

This looks great! Thank you @FailedSitcom !

I've got a few more tweaks in the works, but expect this to be released to npm in the next few days.