Make WordPress Core

Opened 21 months ago

Closed 3 months ago

#54104 closed defect (bug) (worksforme)

Media Library thumbnails broken with PHP 8

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

Description

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:
https://wordpress.org/support/topic/wordpress-5-8-5-7-media-library-issue-with-php-8-0/#post-14855889

Change History (7)

#1 @Hareesh Pillai
21 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
21 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
21 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.


21 months ago

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


3 months ago

#6 @antpb
3 months ago

Hi @knieriemrt ! There have been a bunch of PHP 8 fixes that have happened over the last year. Are you having these issues still in WordPress 6.2? The release candidate for that version is out and you can install using the Beta Tester Plugin: https://wordpress.org/plugins/wordpress-beta-tester/

If this is no longer valid, just let us know and we can get this closed out. If no response in the next week or so we're going to close this out to keep our backlog true. Thanks!

#7 @knieriemrt
3 months ago

  • Keywords reporter-feedback removed
  • Resolution set to worksforme
  • Status changed from new to closed

Hello @antpb,

I just uploaded an image and the thumbnail worked fine. Somewhere along the way in the last 18 months it was fixed. I am currently running PHP 8.2.1 and WordPress 6.1.1.

Thanks

Note: See TracTickets for help on using tickets.