Make WordPress Core

Opened 5 months ago

Last modified 4 months ago

#54104 new defect (bug)

Media Library thumbnails broken with PHP 8

Reported by: knieriemrt Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Media Keywords: dev-feedback reporter-feedback
Focuses: Cc:


WordPress 5.8.1
PHP 8.0.10
All plugins disabled
Default Theme

I upgraded our PHP to 8.0.10 and WordPress is unable to generate thumbnails for images I upload into the media library. I tried a thumbnail regenerating plugin and that did not work either. I tried PHP 8.0.3 and it didn't work. I dropped the PHP version down to 7.4.11 and it started working again.

I am not the only person with this problem:

Change History (4)

#1 @Hareesh Pillai
5 months ago

  • Keywords dev-feedback added

Hello @knieriemrt, Welcome to WordPress Core Trac.
Thanks for trying out the debug steps and the detailed report.

Just wanted to report that I tried to replicate this in my local install (PHP v 8.0.3), however, I do not face the said issue.

I'm starting to think if this has got something to do with the way the server is set up. I'd wait for other reviewers to share their views.

#2 @knutsp
5 months ago

  • Keywords reporter-feedback added
  • Version 5.8.1 deleted

This is most likely caused by the PHP configuration, like missing recommended extensions. Tools - Site Health - Info - Media handling has more info.

#3 @knieriemrt
4 months ago

  • Severity changed from major to normal

Thanks for the responses. After enabling the GD extensions I am closer. I can upload images but the thumbnails don't work right until I edit the image, then rotate it left then back right and save it. After I do that the image seems fine. Any ideas why the act of uploading doesn't generate the thumbnails but saving from the image editor does?

This ticket was mentioned in Slack in #core-media by antpb. View the logs.

4 months ago

Note: See TracTickets for help on using tickets.