rbuchberger / jekyll_picture_tag

Easy responsive images for Jekyll.
https://rbuchberger.github.io/jekyll_picture_tag/
BSD 3-Clause "New" or "Revised" License
619 stars 103 forks source link

Support for jp2 and jxr #116

Closed vincebhh closed 5 years ago

vincebhh commented 5 years ago

I don't know if this is a bug report or a feature request. I would like to provide jp2 and jxr on my webpage and its already kind of supported. If I have a markup preset, where jp2 (or jxr) is the only format, then it simply works. Working example: markup_presets: jp2: formats: [jp2]

But if I add any other format, then it stops working with the error message: "Liquid Exception: must supply new value in index.html" Failing Example: jp2andoriginal: formats: [jp2, original]

Furthermore, there is no list of supported formats (I could find) in the Readme. Which I think would be necessary if not all formats (that image magick supports) are supported.

rbuchberger commented 5 years ago

This came from my assumption that nobody would want to serve anything but jpeg, png, webp, and gif, so I had hardcoded those mime types to avoid needing a new dependency.

I've pushed a new branch which rectifies this and should allow for any image format which imagemagick understands. Do you mind testing it for me? Change the j-p-t line in your gemfile to the following:

gem 'jekyll-picture-tag', git: 'https://github.com/robwierzbowski/jekyll-picture-tag/', branch: 'fix-116'

You'll probably need to run bundle install again.

Side note, if you're talking about jpeg2000, isn't the extension jp2 and not j2p? I'm not super smart on it.

vincebhh commented 5 years ago

1) Thank you so much! In my first test it works great! Furthermore, I didn't run into any other problems yet. I will close this issue.

2) Regarding your side note: You are absolutely right. I switched the letters. I will edit my original post to not confuse anybody.

rbuchberger commented 5 years ago

Thanks for testing it for me! The changes are merged into master now, you can switch your gemfile back and it'll keep working.