This issue is related to
Steps to reproduce :
- Choose a large image to upload on the wiki
- Upload it in the content field of a page using drag and drop
- The code of the page shows the attachment and the size of the image, ex: [[image:attachment.jpeg||height="3447" width="2292"]]
- Save and view the page
- When the browser's window is less wide than the image, the image will be shown stretched on its width (see screenshot with mobile view)
- Remove the height and width parameter from the source code solve the issue.
- The issue doesn't happen using the insert image button of CKEditor toolbar. In that case the image size it's not added as a parameter by default by CKEditor.
Tested on XWiki 9.8.1 and 10.6