Preparing Graphical Assets for the User Interface

For images that represent various states of the same UI element (a slider, a button, a navigation element) of the website, be sure that each “UI set of images” has one consistent size. For example:

  • All pictures for use in a horizontal slider ideally should have the same width and height. If not, they should retain the same image aspect ratio for scaling down.
  • The image for the hover state of a button should be identical in size to the inactive state (see sprite below left).
  • If text is included in a series of images, be sure the baseline of the text is consistently spaced from the edge of the canvas.

Recently Updated in Optimizing and Exporting Website Graphics