Add a permanent pixel border around an image.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
A new canvas is sized to the source dimensions plus border widths, painted with the selected border color or style, and the source bitmap is drawn at the requested offset. The operation changes the pixel bounds rather than merely adding CSS around the image.
data:image/png;base64,iVBORw0KGgo... (image data URL)
PNG with 10px black pixels added on every edge
Framed thumbnails, scanned-document margins, and collage outlines add image borders.