Skip to content

Image resize filters #7

@danburzo

Description

@danburzo

One of my favorite features in Timber is that it adds Twig filters to resize images from within the templates, as:

<img src={{ image | resize('600') }} />

(Hugo also has something similar I believe.)

The filename is then serialized as original-file-${operation}-${size}.png and checked against to avoid processing the same image over and over again.

On the technical front, we need a fast image resizer for Node, and a mechanism to avoid performing the same operation twice, when it's not needed.

If we have images attached to a post (in the same folder as the content), we need a way to specify this resizing in the Markdown file. (Something like shortcodes?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    brainstormingDiscussing ideas around a concept and its implementationhelp wantedExtra attention is neededPriority: nice to have

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions