es131245 Posted December 8, 2014 Share Posted December 8, 2014 Is it posible for php to return html page with text and GD pictures at once? Link to comment Share on other sites More sharing options...
Ingolme Posted December 8, 2014 Share Posted December 8, 2014 It's possible using data URLs as the src attribute of the <img> element: https://developer.mozilla.org/en-US/docs/Web/HTTP/data_URIs I don't recommend it because older versions of Internet Explorer wouldn't support it and because it could really slow down the page loading depending on how large the images are. Normally, the page continues loading while requests for images are being processed but by using Data URLs, the image has to be fully loaded before loading the next element in the page. Also, base64 encoding increases the size of the image by 33%. Just include the PHP files in the src attribute of the <img> elements. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now