Andromeda

Keep images next to the content that uses them.

Next to the entry

app/content/posts/my-post/
├── index.md
└── cover.png
![Cover](./cover.png)

Referenced images are copied into app/assets/builds/andromeda/ during the build and served, digest-stamped, by Propshaft. A path starting with ./ or ../ must point at a file inside the project; a missing file fails the build.

From the frontmatter

---
title: My post
hero_image: ./cover.png
---
attribute :hero_image, :image
<%= image_tag andromeda_image_url(@entry.hero_image) %>

A missing file, or a path that leaves the project, fails the build.

In a component

To hand an image to an MDX component, import it and pass it as a prop:

import photo from './photo.png';

<Figure src={photo} />

The partial receives the same Andromeda::Image an :image attribute holds, so andromeda_image_url(src) works there too. See MDX components.

Images you already have

Written asResult
logo.png (in app/assets/images/)resolved through the asset pipeline, digest-stamped
/banner.png (in public/)left as written
https://example.com/x.pngleft as written

A bare path like logo.png or blog/posts/x.png is looked up in Propshaft’s load path, and one it cannot find fails the build rather than turning into a 404 in production. Without Propshaft, the path is used as written.

Last updated September 29, 2026