One solution to T367463 is: add the noresize class to the image element. But this is invalid for video file.
See:
- Test case: https://en.wikipedia.beta.wmflabs.org/wiki/T367463#video
- https://commons.wikimedia.org/wiki/Template:Potd/2024-07
This problem can only be fixed by the solution given in T367463#9890708:
body.skin--responsive .mw-parser-output table video { max-width: none !important; }