As we know, the format for including a responsive image in a Markdown file is:
![alternate text](image.jpg "Caption"){.class .another-class}
Grav will intelligently grab the actual file image@2x.jpg
, generate the correct resolution image, display that, and cache it. I think Grav must be the only system smart enough to handle that and I love it.
But could Grav be smarter still?
I write a lot of my Markdown with a Markdown editor, instead of a plain text editor. Typora, in particular. Typora can display the image right in the text as you write it - it’s very clever that way.
But. If you type image.jpg
, Typora looks for image.jpg
, not image@2x.jpg
.
I know I can provide the image.jpg
file along side the image@2x.jpg
file and Grav will do the right thing. But what if I called for image.jpg
, there was no such file, but there was an image@3x.jpg
file? Could Grav be made smart enough to look for higher resolution images if the situation called for it, and use the right one?