Skip to content

Another Factoid For The Memory Box: Embedded Images In HTML

This is (yet) another thing I always forget how to do…

<img alt="Red Square" src="data:image/png,%89PNG%0D%0A [...elided...] %60%82" />

With a compatible brower, this gives:

Red Square

Doesn’t necessarily work with all browsers (so you know what to do if you can’t see a reddish-brown square), but it can come in handy at times.

As always, Wikipedia has the lowdown on the whole “Data URI” thing

Tags:

Java Enterprise Edition, JEE, JavaServer Pages, JSP, Tag Libraries, Servlets, Enterprise Java Beans, EJB, Java Messaging Service JMS, BEA Weblogic, JBoss, Application Servers, Spring Framework, Groovy, Grails, Griffon, Seam, Open Source, Service Oriented Architectures, SOA, Java 2 Standard Edition, J2SE