Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Archive

Even smarter responsive images?

Started by Muut Archive 11 years ago · 0 replies · 361 views
11 years ago

As we know, the format for including a responsive image in a Markdown file is:

TXT
![alternate text](image.jpg "Caption"){.class .another-class}

Grav will intelligently grab the actual file [email protected], 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 [email protected].

I know I can provide the image.jpg file along side the [email protected] 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 [email protected] file? Could Grav be made smart enough to look for higher resolution images if the situation called for it, and use the right one?

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1277 9 years ago
Archive · by Muut Archive, 9 years ago
2 885 9 years ago
Archive · by Muut Archive, 9 years ago
2 4014 9 years ago
Archive · by Muut Archive, 9 years ago
1 2891 9 years ago
Archive · by Muut Archive, 9 years ago
3 1074 9 years ago