I use forestry.io for a CMS for my blogs, and it supports the above. (But if I change the link in other ways, it no longer renders correctly.)
I think if it were to take the number ‘350’ and use that as the width attribute for the image, it would work. Alternatively, is there a way for it just drop the piece =.*x and render what remains as usual?
Presently, that results in the image being displayed full-size in forestry.io with the contents visible when you mouse over it. This might still be acceptable, though. Does that work out of the box right now?
If I can create that image render hook myself, then I actually consider that “out of the box” … But I had trouble understanding the documentation for image rendering hooks …
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} />
That is, unfortunately, exactly the example I had trouble understanding. It might be because it’s been a while since I’ve worked with Hugo. (Somewhere around 500 days…)
When I first saw this example, I didn’t understand where .Text and .Title were coming from, but when I just looked at the page again, I noticed this: The render-link and render-image templates will receive this context:, followed a list of what was supported, with size, style, etc, not in the list.
I’m guessing there’s a way to access those through .Attributes ? But attributes will be a map, so maybe accessing it will be something like .Attributes[size] … no idea what that would look like
… but I also don’t understand why .alt doesn’t seem to require with, but .Title does, but then why is title assigned "{{ . }}", and what does {{ end }} do?