Make WordPress Core

Opened 6 weeks ago

Last modified 11 days ago

#62977 new defect (bug)

Twenty Twenty-Five: Wrong image size

Reported by: roger-vikstrom's profile Roger Vikstrom Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.7.2
Component: Bundled Theme Keywords:
Focuses: Cc:

Description

https://www.rvbild.se/2025/02/infor-naturfotodagen-i-vasteras/
wp 6.72
Theme Tweet-twenty-five
Linux 4.18.0-513.18.1.lve.2.el8.x86_64 x86_64
Webbserver
LiteSpeed
PHP-version
8.4.3 (Stöder 64-bitsvärden)
The error occurs on the page https://www.rvbild.se/2025/02/infor-naturfotodagen-i-vasteras/ where the image is set as the featured image. The image becomes too large, and I have disabled all plugins, but the error persists. However, if I remove the featured image and instead use a regular image, the page looks fine. The error occurs on mobile phones, both on Android and iOS devices.

Change History (7)

#1 @poena
6 weeks ago

Thank you @roger-vikstrom

This is a follow up to: https://wordpress.org/support/topic/do-not-fit-in-mobile/

However, to test it, contributors need to know how to reproduce it.
If I read the support request correctly, your image was one size on the front, and then a different size on the front after updating to 6.7.2?

Which version of WordPress did you upgrade from?

#2 @ankitkumarshah
6 weeks ago

Hi @roger-vikstrom,

Thank you for bringing this up.

I think you’ve set a custom width for the featured image, Like this:
https://i.ibb.co/Lh9GG9YD/image.png

As a result, the <figure> tag wrapping the image has an inline style width: 1366px:
https://i.ibb.co/FbJgg8Mt/Untitled-design.png

This might be the cause of the issue you are facing. You can fix it by either removing the width from inspector control or adding custom CSS with media query to handle this.

Here is how it will look if you remove the width:
https://i.ibb.co/7JnXcvjs/image.png

#3 @Roger Vikstrom
6 weeks ago

I have not set set a custom width for the featured image at all
After the recent theme and WordPress update that was done automatically, the answer to the question before the latest update was that I had the most recent version. The issue occurs on all pages of my blog. When I hold my mobile phone horizontally, the page displays correctly, but not when it's vertical had the most recent version. The error occurs on all pages of my blog.

#4 @Roger Vikstrom
5 weeks ago

THX fix it by either removing the width from inspector control Done
end this

#5 @poena
5 weeks ago

You shouldn't have to make changes though, since your image displayed correctly before the update.

#6 @Roger Vikstrom
5 weeks ago

I know, but I had no choice so that those who visit the site would get a true picture.

#7 @SergeyBiryukov
11 days ago

  • Component changed from General to Bundled Theme
  • Summary changed from Wrong imagesize Twenty-Twenty_Five , WP 6.72 to Twenty Twenty-Five: Wrong image size
Note: See TracTickets for help on using tickets.