Give a simple interface icon an SVG if the destination accepts it. A single drawing can then be laid out at several sizes. Produce PNGs when the destination asks for a raster file, or when the precise pixels and small texture are part of the artwork you need to preserve.
Test the icon in its smallest toolbar slot, surrounded by the other controls. A line that looks crisp in a large preview can blend into the toolbar background once the interface is rendered.
Test three types of detail
| Icon design | Starting format | What to verify |
|---|---|---|
| A clean outline such as a folder | SVG | Corners, rounding and line weights at 16 and 24 CSS pixels |
| Pixel art or an icon with baked texture | PNG | A chosen raster output at the required display sizes |
| A small illustration with lettering | Simplify the icon and provide an accessible label | Check that the label can be read without decoding tiny artwork |
MDN's format guide describes SVG as vector artwork suited to interface elements and PNG as a lossless raster format. For a vector export, check the SVG viewBox. Those values map the drawing's coordinates to its viewport. If the canvas closely fits the paths but the stroke extends outside the viewBox, the drawing can get clipped when placed in an image slot. Zoom in if you see a clipped edge. Then return to the intended size to verify that the fix still looks like the other icons.
If you must supply a PNG for a 16 CSS pixel slot, test a 16-pixel export on a standard-density display and a 32-pixel export on a 2× display. For a slot that is 24 CSS pixels, that corresponds to 24 and 48 pixel raster candidates. These are worked examples for a known CSS size. Recalculate if the destination's actual slot or device density differs.
Include the destination in the proof
Open each candidate as the destination will render it. Check a dark and a light surface if the same icon will appear on both. Test at the nominal size and after zooming one step. If an outlined shape fills in or the relevant feature becomes indistinct, adjust stroke weight or simplify the small version. Converting an overly detailed design to SVG preserves its geometry at smaller sizes, including detail too crowded to read.
Apply an accessible label to an icon-only control in the interface. The image file can still be decorative within a labeled button. In the handoff, pair each PNG filename with its slot width and intended density so the integrator has the correct pixel size.
Start with the smallest use of the icon
Take the folder icon from the example. Put it in a toolbar at 16 CSS pixels and compare it with another control drawn in the same visual style. Examine the inside corner, the gap at its tab and the bottom edge on a dark and light surface. The image can make sense at 48 pixels and lose the tab at 16. Simplifying the small drawing allows a useful feature to survive at the size people actually see.
For an SVG, inspect the coordinate box and the shape before changing the exported dimensions. If a stroke is centered on the edge of the view box, some of its thickness can extend past the drawing area and disappear in the image. Add room to the view box or adjust the path, then compare the rendered icon to its neighbors. A wider view box also changes how big the whole design appears inside a fixed slot. You may need to adjust its placement to keep the icon visually centered.
Test one control that uses the icon as a background asset and one that uses it as an image if your product offers both. External assets can be interpreted and styled differently from inline SVG. If the integrator expects the icon color to change with the theme, verify that the actual component provides that behavior. A single proof exported in the light theme is too little evidence about how it will look in the rest of the interface.
Pick raster sizes from the slot and the display
Suppose a plugin installer needs a PNG and shows it in a 24 CSS pixel slot. On a device with twice the density, a 48-pixel PNG provides a distinct image pixel per device pixel under this simple example. Ask the application which variants it accepts and how it names them. Test the standard-density and higher-density copies in the real slot. A 48-pixel raster that the destination scales twice can look different from the original artwork even though its size seemed correct.
If the icon deliberately uses pixel artwork, prepare the required outputs from the approved grid. A conversion to SVG can reproduce the shapes but may not preserve the intended alignment when scaled to arbitrary sizes. Compare the detail you care about at the actual target. With soft texture or a baked highlight, inspect the silhouette against the backgrounds you plan to support. A test PNG should have the intended transparency or background instead of carrying a colored rectangle by accident.
Name the action so the artwork can be simple
A control that only shows a folder does not tell every reader whether it means “open,” “choose a destination,” or “show files.” Use a clear button name for the actual action and ensure a keyboard user can find it. Test it in an interface with the visible focus indicator and see whether the chosen color works at that size. If a label is part of the interface, treat it as a real label in the component. Avoid making the reader decode letters baked into a tiny image.
For delivery, give the receiver each icon name, intended CSS size and any raster sizes they should use. Include the proof that showed it at its smallest size. If a recipient also needs a fixed card graphic, run the image crop comparison with the larger artwork separately. That way a readable toolbar image and an illustrative cover can each retain the details useful to their own job.


