Sub topic 19
Naming and Handoff to Developers
This chapter covers the last step of the workflow: naming exported files and giving them to developers in a form they can use without guessing. It assumes you have read the earlier chapters on formats, export dimensions, compression, and verification. You should be comfortable with the idea that one design image often becomes several files, such as a 1x and a 2x version, or AVIF, WebP, and JPEG variants.
Why naming and handoff matter
Exporting well is only half the job. A folder containing Frame 12.png, hero final FINAL.jpg, and image (3).webp forces a developer to open each file to learn what it is. Developers then rename files, and some of those renames break references in the design file, in tickets, or in code.
Good handoff answers four questions for every image:
- What is it, and where does it appear on the page?
- Which format, size, and density is this particular file?
- At what size should it be displayed?
- Is it final, or will it be replaced?
Naming rules that work on the web
File names become part of URLs. URLs are case-sensitive on many servers and cannot safely contain spaces or many special characters. A safe convention avoids all of those problems.
- Use lowercase letters only.
Hero.jpgandhero.jpgare different files on a Linux server, and the mismatch is a common cause of images that work locally and fail after deployment. - Use hyphens between words, not spaces or underscores. Search engines treat hyphens as word separators, and spaces turn into
%20in URLs. - Use only letters, digits, and hyphens. Avoid accents, parentheses, ampersands, and emoji.
- Describe the content or the role, not the state. Write
team-desk, notfinal-v2. - Keep names short but specific enough that two images never collide.
A pattern for responsive sets
When one image exists in several sizes, put the pixel width at the end of the name. This matches the w descriptors in srcset, so the name and the markup agree.
hero-400.jpg
hero-800.jpg
hero-1600.jpg
hero-1600.webp
hero-1600.avifFor fixed-size images that use density descriptors, use the @2x suffix that design tools and developers already recognize.
logo.png
[email protected]Pick one convention per project and apply it everywhere. A mix of hero-800.jpg and hero_800w.jpg is harder to work with than either one alone.
| Situation | Convention | Example |
|---|---|---|
| Fixed-size image, two densities | `name.ext` and `[email protected]` | `logo.png`, `[email protected]` |
| Responsive image, several widths | `name-WIDTH.ext` | `hero-800.jpg` |
| Same image, several formats | Same base name, different extension | `hero-800.webp` |
| Icon set | `icon-NAME.svg` | `icon-add.svg` |
Keeping the base name identical across formats lets a developer write a picture element by changing only the extension.
<picture>
<source type="image/avif" srcset="hero-800.avif">
<source type="image/webp" srcset="hero-800.webp">
<img src="hero-800.jpg" width="800" height="450" alt="Team working at a shared desk">
</picture>Folder structure
Organize by purpose, not by date or by who exported the files. A small, predictable tree is enough.
images/
hero/
hero-400.jpg
hero-800.jpg
hero-1600.jpg
hero-1600.webp
hero-1600.avif
logo/
logo.svg
logo.png
[email protected]
icons/
icon-add.svg
icon-close.svgDo not put the originals in this tree. Source files (layered designs, full-resolution masters) belong in a separate location, so a developer never ships a 12 MB master by accident.
What a handoff note should contain
Files alone do not say how they are used. Add a short manifest, either as a table in the ticket or as a text file next to the images. For each image, list:
- The file name and format.
- The pixel dimensions of each file.
- The display size in CSS pixels. This is the value that goes into
widthandheight. - The alt text. The designer usually knows what the image conveys, so writing it here saves a round trip.
- Whether the image is above the fold. Developers use this to decide on lazy loading. Images below the fold can be loaded late. The main image at the top of the page should not be.
| File | Pixels | Display size | Alt text | Notes |
|---|---|---|---|---|
| `hero-800.jpg` | 800 × 450 | 800 × 450 | Team working at a shared desk | Above the fold, do not lazy-load |
| `hero-1600.jpg` | 1600 × 900 | 800 × 450 | Team working at a shared desk | For 2x screens |
| `icon-add.svg` | 24 × 24 viewBox | 24 × 24 | Add | Uses `currentColor` |
| `[email protected]` | 240 × 80 | 120 × 40 | Acme logo | 2x of `logo.png` |
A common mistake is listing the file's pixel size as the display size. The 2x file above is 240 pixels wide but displays at 120 CSS pixels. If a developer sets width="240", the logo appears twice as large as designed.
Decorative images need a decision too. If an image adds nothing for someone who cannot see it, say so, and the developer will use an empty alt="".
Handing off SVG
SVG files need extra notes because the developer may inline them in the page rather than link them.
- State whether the icon should inherit text color. Set
stroke="currentColor"orfill="currentColor"in the export, as in the icon example from the SVG chapter. - Keep the
viewBox. Without it, the icon will not scale. - Remove hidden layers and unused definitions before export, since they remain in the file.
- Give meaningful IDs or none at all. Generic IDs such as
aorpath1can clash when several inlined SVGs share a page.
Sharing files and versioning
Choose one source of truth and tell the team where it is. This could be a shared drive, the code repository, or the handoff feature of your design tool.
- Do not send files by chat or email attachment, where they get recompressed or renamed.
- When an image changes, keep the same file name and replace the file. Do not add
-v2. Version history belongs in the repository or the drive, and a new name means every reference must change. - Browsers and CDNs cache images by URL. If you replace a file under the same name, returning visitors may see the old one. Tell the developer when a file has been replaced so they can add a cache-busting query string or a content hash.
- Record the settings you used, such as quality 80 and the 1600-pixel width. The next person can then reproduce the export.
Common errors
- Mixed case names. Fine on a designer's laptop, broken on the server.
- Exporting at display size only. A 120-pixel-wide logo exported once looks soft on high-density screens, so the handoff needs a 2x file.
- Missing format fallback. If you deliver only AVIF, browsers that lack support show nothing. Always include the JPEG or PNG.
- Unlabeled scale. A file named
logo.pngthat is actually 240 pixels wide leads developers to display it at the wrong size. - Leaving tool defaults. Names like
Frame 12andRectangle 4tell nobody anything.
A handoff checklist
Exercise
A designer exports Hero Image FINAL (2).JPG at 1600 pixels wide for a hero that displays at 800 CSS pixels wide and 450 CSS pixels tall. The developer will also use a WebP version. Give a better file name for each file, and state the values the developer should use for width and height.
Show answer
Use lowercase, hyphens, and the pixel width, for example hero-1600.jpg and hero-1600.webp. If an 800-pixel version is also exported, name it hero-800.jpg. The width and height attributes should be 800 and 450, because they describe the display size in CSS pixels, not the 1600-pixel file width.
Exercise
You replace the file team-desk-800.jpg with a corrected version under the same name. Why might visitors still see the old image, and what should you do at handoff?
Show answer
Browsers and CDNs cache images by URL, so a repeat visitor may keep the cached file. Tell the developer the file was replaced so they can add a cache-busting query string or a content hash to the URL, or clear the CDN cache.
Exercise
List four things a handoff manifest should record for each image.
Show answer
Any four of: file name and format, pixel dimensions of each file, display size in CSS pixels, alt text, whether the image is above the fold, and the export settings used (such as quality and width).