Skip to content
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

Open
pawelszewczak opened this issue Aug 3, 2024 · 3 comments
Open

Image in Base64 #518

pawelszewczak opened this issue Aug 3, 2024 · 3 comments
Labels
feature-request New Feature / Plugin Candidate

Comments

@pawelszewczak
Copy link

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,/)

@gingerchew
Copy link
Collaborator

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.

@pawelszewczak
Copy link
Author

@gingerchew

I retrieve images from a database and upload them to my mobile app just in Base64 format.

@gingerchew gingerchew added the feature-request New Feature / Plugin Candidate label Aug 6, 2024
@gingerchew
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New Feature / Plugin Candidate
Projects
None yet
Development

No branches or pull requests

2 participants