Open pawelszewczak opened 1 month ago
Hey there @pawelszewczak
That's an interesting idea. Currently we're in a PR freeze while we get ready for the next version of GLightbox. Is there a reason you're relying on base64 images? Outside of using them inside of CSS, it is a tool I rarely reach for and am interested.
@gingerchew
I retrieve images from a database and upload them to my mobile app just in Base64 format.
Hmmm, interesting, and this is to avoid costs associated with hosting files? I'll leave this open so that we can reference it in the future as a possible addition.
Script does not correctly recognise base64 images
You could change this line:
(e = e.toLowerCase()).match(/\.(jpeg|jpg|jpe|gif|png|apn|webp|svg)$/)
with this:
(e = e.toLowerCase()).match(/\.(jpeg|jpg|jpe|gif|png|apn|webp|svg)$|^data:image\/(jpeg|jpg|jpe|gif|png|apn|webp|svg);base64,/)