Display images with mediaclasses

Define reusable image sizes in priv/templates/mediaclass.config and use them in image tags. For example, a local mediaclass can constrain an image's width:

Define reusable image sizes in priv/templates/mediaclass.config and use them in image tags. For example, a local mediaclass can constrain an image's width:

[
    {garden_card, [{width, 640}]}
].
{% image id mediaclass="garden_card" alt=id.title %}

Choose a meaningful description for an image when its purpose is not captured by the title. Check both portrait and landscape source images. Cropping is a design decision; do not add it automatically to every size.

Use model#media for media information and tag#image for rendering. See Work with uploaded media and Build and serve frontend assets.