-
-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image in Base64 #518
Comments
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. |
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. |
I do the same. I have all user uploaded images in database as blobs then send base64 to the browser. I am trying to open a lightbox from an inline div with img tag and src = base64. Has this been resolved in current version ? |
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,/)
The text was updated successfully, but these errors were encountered: