# Icons, Images & Photo Credits

## Icons, Images & Photo Credits

**Folders:** `src/assets/images/`, `public/images/` · **Skill level:** Beginner

### Icons
Covena uses [Lucide](https://lucide.dev/icons) icons. Where a content file has an `icon` field, write any Lucide icon name, in either form: `users`, `map-pin`, `scroll-text`, or `ScrollText`.

```yaml
# src/content/practice-areas/english/employment.md
icon: "users"
```

```yaml
# src/content/sections/english/features-trio.md
items:
  - icon: "map-pin"
```

Practice areas show their icon on their cards and rows, such as the practice grid on Home 1 and `/practice-areas/`. The demo icons are `briefcase`, `users`, `landmark`, `lightbulb`, `house`, `scroll-text`, `key-round`, `plane`, `shield`, and `hard-hat`. Browse [lucide.dev/icons](https://lucide.dev/icons) and copy the name shown under an icon.

<Aside type="tip" title="For developers">
  Icon names resolve in this order in `src/layouts/helpers/Icons.astro`: social
  brands, then your own SVG files in `src/assets/images/icons/custom/` (by file
  name), then Lucide. A custom file wins over a Lucide icon with the same name,
  and it takes the text colour like the others. Icons that point in a direction,
  such as arrows, mirror on Arabic pages through the `directionalIcons` list in
  the same file.
</Aside>

### Where Images Live
| Folder | What is in it | How content points at it |
| --- | --- | --- |
| `src/assets/images/covena/` | Every demo photo, in folders: `about`, `attorneys`, `blog`, `careers`, `hero`, `logos`, `meetings`, `office`, `practice` | `/images/covena/<folder>/<file>.jpg` |
| `src/assets/images/` | The logo (`logo.svg`, `logo-light.svg`) and favicon sources | `/images/logo.svg` |
| `public/images/` | The social image (`og-image.jpg`) and the generated favicons | Served as they are |

Images in `src/assets/images/` are resized and compressed when the site builds, at the sizes each layout needs. Files in `public/` are copied as they are.

A content path starts at `/images/`, and the theme looks for it in `src/assets/images/` first, then in `public/`. If the file is in neither place, the build stops with "Image not found" and the path, so a broken image never ships.

### Replace A Sample Photo
<Steps>

1. Put your photo in the same folder as the one you replace, for example `src/assets/images/covena/attorneys/`, or in a new folder under `src/assets/images/`.

2. Open the content file and change the path. Attorney files have two: `cardImage` (the card) and `heroImage` (the profile page).

   ```yaml
   cardImage: "/images/covena/attorneys/your-name.jpg"
   cardImageAlt: "Your Name, partner at Your Firm"
   ```

3. Change the alt text next to it (`imageAlt`, `cardImageAlt`, `heroImageAlt`) to describe your photo.

4. Do the same in the French and Arabic files, which have their own paths and alt text.

</Steps>

Keep the aspect ratio of the photo you replace, or the crop changes. Portraits on attorney cards are upright, and hero and card photos are landscape. A photo of 1600 to 2000 px on its long side is plenty, because the build makes the smaller sizes.

### Alt Text
Describe what the photo shows, in a few plain words: "Daniel Mercer, managing partner at Covena Law", or "Workers in hi-vis vests on a work site, seen from behind". Write the alt text in each language's own file. For a photo that only decorates, ask a developer to give it an empty alt instead of leaving out the field.

### Client Logos
The client logos on Home 2 (`logos-row.md`) are made-up companies. Each `logo` in that file is the name of an SVG in `src/assets/images/covena/logos/`, without `.svg`: one-colour SVGs with `fill="currentColor"`, 32 px tall. Only show the logos of clients who agreed to it, or remove the section with `enable: false`.

### Photo Credits And Licences
The demo photos are from [Unsplash](https://unsplash.com) under the Unsplash License. They are placeholders for your own photos and are not licensed for resale on their own. The README lists the credits for the fonts (SIL Open Font License), the icons (Lucide, ISC), and the scripts the theme uses.

<Aside type="note">
  Use real photos of your own lawyers and offices before launch. Stock portraits
  on an attorney page tell visitors the people are not real.
</Aside>

### Do It With AI
```text
Replace the photo of the attorney [SLUG] with my photo at src/assets/images/team/[FILE].jpg.
Update cardImage and heroImage in src/content/attorneys/english/[SLUG].md and in the
french and arabic files with the same name. Write new alt text in each language:
"[NAME], [ROLE] at [FIRM]". Don't change anything else, then run npm run astro-check.
```