Closed
Description
Description
When image attachment thumbnails are quite large, the thumbnail's aspect ration may be distorted when the thumbnail is viewed on a small device. This is because the width and height attributes are set on the thumbnail, but then CSS sets max-width: 100% on it.
Steps to reproduce
- Enable attachment thumbnails and set the thumbnail size to something quite large, e.g. 1000 x 1000.
- Attach a large image to a post.
- View the post on a small device.
Environment (complete as necessary)
- Version/Git revision:
- Database Type:
- Database Version:
- PHP Version:
Additional information/references
To fix this, all we need to do is remove the height="' . $attachment['height'] . '" bit from this line:
https://github.com/SimpleMachines/SMF2.1/blob/b9e3b273aa8c1dcdde424dfb751e65bd223f2d4c/Themes/default/Display.template.php#L786