Codeinwp / Nivo-Lightbox-jQuery

A simple, flexible, responsive, retina-ready jQuery lightbox plugin.
http://dev7studios.com/nivo-lightbox
MIT License
157 stars 87 forks source link

Image served from Jetpack photon has "?ssl=1" on end of URL and won't load in lightbox #76

Open brencecoghill opened 7 years ago

brencecoghill commented 7 years ago

Related link: https://www.sandbox.imageworkshop.com/projects/william-angliss-institute/

Nivo works fine with Jetpack photon turned off.

When I turn on Jetpack photon, the image URL is updated to be "https://i0.wp.com/www.sandbox.imageworkshop.com/wp-content/gallery/case-study-william-angliss/wai-course-guide-pg14.jpg?ssl=1"

For some reason this URL does not get recognised as an image, and isn't launched by Nivo lightbox. Instead, it just opens the image as a separate link.

The following error is displayed in the console: Resource interpreted as Document but transferred with MIME type image/webp: "https://i0.wp.com/www.sandbox.imageworkshop.com/wp-content/gallery/case-study-william-angliss/wai-course-guide-pg14.jpg?ssl=1".

you can see details on this page. I'm not sure how to resolve this? I found this answer, which might be related - I'm just not sure how to implement it for NIVO?https://stackoverflow.com/questions/13985003/resource-interpreted-as-document-but-transferred-with-mime-type-image-jpeg

brencecoghill commented 6 years ago

as an update I've confirmed that the issue is caused due to the ?ssl=1 on the URL. I've updated the title to make this clearer. Does Nivo need to be updated to gracefully handle that, and still recognise that this is an image?