{{ with resources.Get $image }}
{{ $image = (.Fit "200x200").RelPermalink }}
{{ end }}
This way, if $image pointed to a local resource, it would get transformed the way I like. But if $image pointed to, say, a picture somewhere on the interwebs, it would be passed further verbatim.
0.90.0 breaks this behaviour: even if $image is an external picture, it will get fetched and transformed. Even worse: if the external resource is unavailable (offline, in another network, etc) at the time of the build, the build fails with an error.
Is there a way to work around this regression while maintaining the original logic in the code snippet?
Too bad there isn’t an option to check if there was an error and handle it gracefully in a template, rather than make the whole build fail because of something you have no control over in the first place…