Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smart crop thumbnails not showing in WordPress UI #768

Open
1 task done
jeffpaul opened this issue May 14, 2024 · 1 comment
Open
1 task done

Smart crop thumbnails not showing in WordPress UI #768

jeffpaul opened this issue May 14, 2024 · 1 comment
Labels
help wanted Extra attention is needed type:bug Something isn't working.
Milestone

Comments

@jeffpaul
Copy link
Member

jeffpaul commented May 14, 2024

Describe the bug

The smart cropped thumbnails are being generated but are not shown in the WordPress UI. The smart crop feature appears to be properly generating thumbnails as viewed in the uploads directory, but for some reason are not displayed in the WP UI. Expectation is that viewing the Media Library in either list or grid views would show the correct smart-cropped thumbnail for the image.

From @dkotter:

So the problem seems to be the Grid view doesn't use the thumbnail image. For this particular image, the List view uses the 150x150 thumbnail image which is smart cropped. But the Grid view is using the medium image size (136x300 in this case), which isn't smart cropped (it doesn't get cropped at all, just scaled down).

So we may need to check WP core to see if there's a way to filter the grid view to show the correct cropped thumbnail size or perhaps work on a fix upstream in core to allow the thumbnails to be shown in grid view (or at least filterable).

Steps to Reproduce

  1. Ensure ClassifAI is active and the Smart Crop feature (for older versions the Image Processing / Azure setting area) settings is enabled
  2. Upload an image to the Media Library
  3. View the image and its thumbnail in the uploads directory, see properly smart-cropped image
  4. View within the WP UI and see that the default center-crop is still shown

Screenshots, screen recording, code snippet

Sample images to test with:
th-2843024898

test

Screenshot 2024-05-14 143311

Environment information

No response

WordPress information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jeffpaul jeffpaul added type:bug Something isn't working. help wanted Extra attention is needed labels May 14, 2024
@jeffpaul jeffpaul added this to the 3.2.0 milestone May 14, 2024
@jeffpaul jeffpaul moved this from Incoming to To Do in Open Source Practice May 14, 2024
@jeffpaul
Copy link
Member Author

Note that we should credit @kmgalanakis and @dkotter for any resulting fix on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed type:bug Something isn't working.
Projects
Status: To Do
Development

No branches or pull requests

1 participant