fancybox
fancybox copied to clipboard
External images (cloudinary) and data-srcset attribute
Hello, firstly thanks for your great product. I'm using it for years and I'm very satisfied with that. Now to my issue.
I'm trying to achieve a gallery with external sources/images from Cloudinary. Everything works well except using the data-srcset attribute.
I created demo example on jsfiddle.
You can see two images. On first one I used the data-srcset attribute and if you click on image you've got an alert message. If you click on second image without attribute it is working.
Thanks for any help.
Hi,
The problem is that your urls contain commas, but commas are used to separate srcset paths.
Hi,
I am having the same problem, but I am using "ImageProcessor" (https://imageprocessor.org/imageprocessor-web/imageprocessingmodule/resize/) to create url's for cropped images. (Note: this package is used in the Umbraco CMS, so heavily used on many many websites!).
This package provides the opportunity to specify the center for a cropped image, as a comma-seperated value. From their documentation:
"You may specify a center as a fraction from the top-left corner of the image in y,x format"
So an url could be:
http://your-image?width=300&height=300&mode=crop¢er=0.25,0.30
And thus a resulting data-srcset could be:
http://your-image?width=900&height=600&mode=crop¢er=0.25,0.30 1200w, http://your-image?width=300&height=200&mode=crop¢er=0.25,0.30 400w
As a possible solution: Is it possible for you to add a fancybox option setting, in which we can specify another data-srcset separator character/string?
Hi Fancyapps, I'm just wondered if this issue is processed or forgotten?
I would really appreciate it if it could be solved. I've just one big project and I need the cloudinary URL working. I have your Extended Commercial license (bought few years ago) but if it speeds up the process I can donate you more.
Thanks
We are looking into using FancyBox for our corporate websites but it must be able to work well with Cloudinary since we host all our images on Cloudinary’s CDN. Has this issue been forgotten?