How to prevent an image being clipped by page margins

When an #image is added that is larger than the space between page margins, the image content is clipped. I wonder if there is any way to prevent this, i.e. to make the image go “over” the header.

Link to example: Typst

The image function has a fit parameter you can use to control this (you want fit: "contain").

Hmm, not really what I’m looking for, I want my image to go “over” the header, whereas fit just scales down the image again. I have clarified my question.

What you write in markup normally goes in the text area of the page, which excludes the margins. To use the whole page area, you can put the image in the page background or page foreground (see the page documentation).

If you really want to put the image in the text area and at the same time let it protrude in the margins, you can wrap it in a pad or block with negative padding/inset.

2 Likes