If I am not mistaken, your snippet breaks the ![[image.jpg|30]] resizing notation.
For instance:
![[image.jpg|30]]
![[image.jpg|100]]
![[image.jpg|200]]
are all rendered as identical figure sizes (when not hovering with the mouse). Without your snippet, the same figured is instead rendered three times with distinct sizes.