This post covers the imghover and img shortcodes. Images can also be embedded directly using markdown ![Ferris](ferris.svg), but it is better to use a shortcode so you can explicitly set the width and height, this will help prevent content layout shift which improves user experience and the google lighthouse score.
img Shortcode
src is the path and filename of the image. (mandatory)
class sets a class for the image. (optional)
alt sets the alt note for the image. (recommended for google lighthouse)
w is the width of the image. (recommended for google lighthouse)
h is the height of the image. (recommended for google lighthouse)
Usage (same path)
{{img(src="ferris-happy.svg" alt="Ferris is Happy" w=600 h=400)}}
Output
<imgsrc="ferris-happy.svg"alt="Ferris is Happy"width="600"height="400"/>
<divid="same-ferris-gesture"><b>same-ferris-gesture on hover</b></div><divid="same-ferris-gestureimage"title="same-ferris-gesture"></div><divid="same-ferris-happy"><b>same-ferris-happy on hover</b></div><divid="same-ferris-happyimage"title="same-ferris-happy"></div><style>#same-ferris-gestureimage{background-image:url('ferris.svg');background-size:contain;background-repeat:no-repeat;width:45%;height:0;padding-top:30%;}#same-ferris-gestureimage:hover{background-image:url('ferris-gesture.svg');}#same-ferris-happyimage{background-image:url('ferris.svg');background-size:contain;background-repeat:no-repeat;width:45%;height:0;padding-top:30%;}#same-ferris-happyimage:hover{background-image:url('ferris-happy.svg');}</style>
<divid="rel-ferris-gesture"><b>rel-ferris-gesture on hover</b></div><divid="rel-ferris-gestureimage"title="rel-ferris-gesture"></div><style>#rel-ferris-gestureimage{background-image:url('img/ferris.svg');background-size:contain;background-repeat:no-repeat;width:45%;height:0;padding-top:30%;}#rel-ferris-gestureimage:hover{background-image:url('img/ferris-gesture.svg');}</style>
<divid="root-ferris-gesture"><b>root-ferris-gesture on hover</b></div><divid="root-ferris-gestureimage"title="root-ferris-gesture"></div><style>#root-ferris-gestureimage{background-image:url('https://lunce.com/overview-rich-content/ferris.svg');background-size:contain;background-repeat:no-repeat;width:45%;height:0;padding-top:30%;}#root-ferris-gestureimage:hover{background-image:url('https://lunce.com/overview-rich-content/ferris-gesture.svg');}</style>