Dynamic image resizing via shortcodes (roadmap)

Let’s think about a scenario with a content editor and a web developer.

Assume we have content files in the following style. There is a content editor that creates such files for all his trips (possibly in a nice web-based editor in the future):

+++
title = "My Trip to Paris"
date = "2015-03-18"
gallery = ["image1.jpg", "image2.jpg", "image3.jpg"]
+++

Have fun looking at my images of Paris.

![Map](map.jpg)

The question is: Where is the right place to put information about the size of those images?

I would argue that the size of the gallery images should not be in the content files. They should be in the template. This way the web developer/designer decides about the resizing and cropping of the image. An example how this can be done are the imageSize and imageCrop functions in Webhook.

The size of map.jpg could be defined via a shortcode in the content itself. This is a size the content editor must decide.


I think that in the end we might need the functionality to define image sizes both in the content via shortcodes and also in the templates via functions (for me templates would be even more important). Ideally it would cover both image resizing and image cropping.

1 Like