Jump to content

base64 encoded images


ngreenwood6

Recommended Posts

I have a good question for anyone with experience with base64. I have some images that are stored as base64 encoded. I would like to display them in the browser. The code I am using is:

 

<img src="data:image/jpeg;base64,BASE_64_SOURCE_HERE">

 

This is working fine in all browsers with the exception of ie7. In looking around in google seems as if ie7 does not support this functionality. I would like to be able to display these images using there base64 encoded values rather than the actual images because I am going to be distributing this code to users and do not want to have them update the location of the image after they export the data. I know I could create a php page and send the data to the php page and use the php page as the source and have it return an image but like I said I will be distributing this to other users and do not want to have them do this as well. I want to make something easy for them to use without worrying about the details. Does anyone have any ideas on how I can get this to work in ie7? Is there a workaround for this or another way to store the images in a similar manner?

 

Any help is appreciated.

Link to comment
https://forums.phpfreaks.com/topic/241077-base64-encoded-images/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.