so, if you have to add the jpg at the end, why not just use the img tag?
The tag actually embeds the image XXXXXXXh.jpg which is an auto generated smaller sized version of the image, and enables clicking for the full sized version.
Not a big deal with small jpgs, but when you embed a 4K screen shot, the image shown in the page is no larger than 1024×1024. Helps with the load times on mobile devices by quite a bit.