That's not a common pattern? I use the
InsertSVG plugin which defaults to that but with <div> if I recall. I changed it to <figure> because I read that it was better to use that instead of a generic <div> tag for inserting images (for accessibility or whatever, I'm still figuring this stuff out). I'll try editing it a bit and see how it goes, thanks.
Moving the ID to the SVG instead fixes it, but does it matter if the ID is on the image itself rather than the figure container then?