WordPress.org

Make WordPress Core

Opened 7 weeks ago

Closed 7 weeks ago

#50397 closed defect (bug) (invalid)

Warning: No images found. - when running wp media regenerate on specific image

Reported by: mattiasf Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.4.2
Component: Media Keywords:
Focuses: Cc:

Description

I am trying to run wp media regenerate 67153. If I go into my database I see this row:

| ID    | post_author | post_date           | post_date_gmt       | post_content | post_title             | post_excerpt | post_status | comment_status | ping_status | post_password | post_name                | to_ping | pinged | post_modified       | post_modified_gmt   | post_content_filtered | post_parent | guid                                                                   | menu_order | post_type  | post_mime_type | comment_count |
|-------|-------------|---------------------|---------------------|--------------|------------------------|--------------|-------------|----------------|-------------|---------------|--------------------------|---------|--------|---------------------|---------------------|-----------------------|-------------|------------------------------------------------------------------------|------------|------------|----------------|---------------|
| 67153 | 6           | 2019-01-23 14:12:50 | 2019-01-23 14:12:50 |              | earring-anpe-jamie.jpg |              | inherit     | closed         | closed      |               | earring-anpe-jamie-jpg-2 |         |        | 2020-06-10 11:54:53 | 2020-06-10 11:54:53 |                       | 223371      | https://mydomain.com/wp-content/uploads/2019/01/earring-anpe-jamie.jpg | 0          | attachment | image/jpeg     | 0             |

So clearly the image exists in the database. Also, If I go into wp-content/uploads/2019/01/ folder and run find . -name "earring-anpe-jamie*" I see:

`[user@s1 01]$ find . -name "earring-anpe-jamie*"
./earring-anpe-jamie-scaled.jpg
./earring-anpe-jamie.jpg`

So the image should be there, I am just not tottaly sure why it won't generate it's thumbnails.

Change History (2)

#1 @mattiasf
7 weeks ago

I tried using this plugin: https://wordpress.org/plugins/regenerate-thumbnails/ to regenerate the specific media, and that worked fine.

However, I noticed it said when it was complete:

The attachment says it also has these thumbnail sizes but they are no longer in use by WordPress. You can probably safely have this plugin delete them, especially if you have this plugin update any posts that make use of this attachment.

medium (old): 273×300 pixels earring-anpe-jamie-273x300.jpg
large (old): 932×1024 pixels earring-anpe-jamie-932x1024.jpg
thumbnail (old): 150×150 pixels earring-anpe-jamie-150x150.jpg
medium_large (old): 768×844 pixels earring-anpe-jamie-768x844.jpg
1536x1536 (old): 1398×1536 pixels earring-anpe-jamie-1398x1536.jpg
2048x2048 (old): 1864×2048 pixels earring-anpe-jamie-1864x2048.jpg
lazy (old): 22×24 pixels earring-anpe-jamie-22x24.jpg
woocommerce_thumbnail (old): 300×300 pixels earring-anpe-jamie-300x300.jpg
woocommerce_single (old): 600×659 pixels earring-anpe-jamie-600x659.jpg
woocommerce_gallery_thumbnail (old): 100×100 pixels earring-anpe-jamie-100x100.jpg
shop_catalog (old): 300×300 pixels earring-anpe-jamie-300x300.jpg
shop_single (old): 600×659 pixels earring-anpe-jamie-600x659.jpg
shop_thumbnail (old): 100×100 pixels earring-anpe-jamie-100x100.jpg

I am not sure how it comes to the conclusion that the sizes are no longer in use by WordPress, but surely they are. They are in use for several products.

#2 @SergeyBiryukov
7 weeks ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Hi there, welcome back to WordPress Trac! Thanks for the ticket.

So the image should be there, I am just not tottaly sure why it won't generate it's thumbnails.

This sounds like an issue with the wp media regenerate command that should be reported on WP-CLI repo.

I am not sure how it comes to the conclusion that the sizes are no longer in use by WordPress, but surely they are. They are in use for several products.

It might be a good idea to ask this on the Regenerate Thumbnails' support forums.

It doesn't seem like there are any actionable items for WordPress core here, so I'm closing the ticket for now.

Feel free to reopen with the steps to reproduce on a clean install if the issue still happens with all plugins disabled and a default theme (Twenty Twenty) activated.

Note: See TracTickets for help on using tickets.