Make WordPress Core

Opened 7 years ago

Last modified 3 weeks ago

#39630 assigned defect (bug)

PDF Thumbnails in Media Library Don't Fall Back to Full Size

Reported by: daleharrison's profile daleharrison Owned by: antpb's profile antpb
Milestone: 6.7 Priority: normal
Severity: normal Version: 4.7
Component: Media Keywords: has-patch
Focuses: ui, administration Cc:

Description

When previewing uploaded files in the Media Library, image thumbnails fall back to displaying the full size image when the option medium_size_h is set to 0 (the 0 setting is used to stop WordPress generating thumbs at that size).

The same functionality does not work for uploaded PDFs, instead displaying wp-includes/images/media/document.png in their place. The full-size thumbnail is generated, but not used.

The Attachment Details modal window successfully falls back to the full size image when previewing a PDF under the same circumstances.

Attachments (3)

Screen Shot 2017-01-18 at 12.47.17 PM.png (92.7 KB) - added by daleharrison 7 years ago.
Example of PDF Thumbnail Compared to Image Thumbnails in Media Library
39630.diff (1.0 KB) - added by kushang78 5 months ago.
Added patch for this ticket.
Screenshot from 2024-06-13 17-45-38.png (264.7 KB) - added by mai21 4 weeks ago.
pdf in media library

Download all attachments as: .zip

Change History (38)

@daleharrison
7 years ago

Example of PDF Thumbnail Compared to Image Thumbnails in Media Library

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


7 years ago

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


22 months ago

#3 @joedolson
22 months ago

  • Milestone changed from Awaiting Review to 6.2
  • Owner set to joedolson
  • Status changed from new to accepted

#4 @antpb
22 months ago

This was discussed in a recent Media component meeting and we suspect that the fallback just needs one more step between medium and default pdf icon to include the full thumb after no medium found.

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


20 months ago

#6 @antpb
20 months ago

  • Owner changed from joedolson to antpb
  • Status changed from accepted to assigned

This ticket was mentioned in Slack in #core by mukeshpanchal27. View the logs.


17 months ago

#8 @mukesh27
17 months ago

This ticket was discussed during the recent bug scrub. It looks like it's unlikely that work will be done on this during the 6.2 cycle.

@antpb Is this still possible to land in 6.2, or should it be moved to Future Release for now?

#9 @mukesh27
17 months ago

  • Keywords needs-patch added

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


17 months ago

#11 @joedolson
17 months ago

  • Milestone changed from 6.2 to 6.3

Moving this to 6.3; @antpb hasn't had the time to tackle it during this cycle, but we still think this should be fixed soon.

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


14 months ago

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


13 months ago

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


13 months ago

This ticket was mentioned in Slack in #core by mukeshpanchal27. View the logs.


12 months ago

#16 @oglekler
12 months ago

  • Milestone changed from 6.3 to 6.4

This ticket was discussed during bug scrub and due to lack of patch it was decided to move it out of the current 6.3 milestone. Seeing that @antpb wrote that working on it, I am moving this to 6.4.

Ad props to @mukesh27

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


12 months ago

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


11 months ago

#19 @nicolefurlan
10 months ago

Noting here that @antpb confirmed a few weeks ago that this would be addressed for 6.4. We're ~2 weeks from RC1 so just let us know if that is unlikely to happen by then.

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


9 months ago

#21 @antpb
9 months ago

  • Milestone changed from 6.4 to 6.5

I'm still pending a patch on this one and need to move to 6.5

@kushang78
5 months ago

Added patch for this ticket.

#22 @kushang78
5 months ago

  • Keywords has-patch added; needs-patch removed

Successfully included the full thumb after no medium found. Please check the attached patch file.

Thanks!

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


5 months ago

#24 @swissspidy
5 months ago

@antpb Just checking in, is this still on your radar for 6.5?

#25 @swissspidy
5 months ago

  • Milestone changed from 6.5 to 6.6

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


7 weeks ago

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


6 weeks ago

#28 @hmbashar
5 weeks ago

  • Keywords needs-testing added

#29 @mai21
4 weeks ago

  • Keywords needs-testing-info added

@daleharrison Thanks for reporting the issue.

Just confirming the problem, is it in displaying pdf/audio file name here /wp-admin/upload.php?mode=grid?

@mai21
4 weeks ago

pdf in media library

This ticket was mentioned in Slack in #core-test by mai21. View the logs.


4 weeks ago

#31 @daleharrison
4 weeks ago

@mai21 Correct, I observed this in the grid view

#32 @sudipatel007
4 weeks ago

Test Report


Description

Patch has been tested and it is working as expected.
Now PDF Thumbnails is appeared in Media Library.

Environment

  • WordPress: 6.6-beta3-58440-src
  • PHP: 8.1.23
  • Server: nginx/1.16.0
  • Database: mysqli (Server: 8.0.16 / Client: mysqlnd 8.1.23)
  • Browser: Chrome 126.0.0.0 (macOS)
  • Theme: Twenty Nineteen 2.8

Test Results

Now PDF Thumbnails is appeared in Media Library.

Screenshot - https://prnt.sc/Gw-lwpKt_tv8

#33 @sudipatel007
3 weeks ago

  • Keywords needs-testing needs-testing-info removed

This ticket was mentioned in Slack in #core by nhrrob. View the logs.


3 weeks ago

#35 @audrasjb
3 weeks ago

  • Milestone changed from 6.6 to 6.7

As per today's bug scrub, we're going to move this ticket to 6.7. It's pretty close to resolution but we're also close to 6.6 RC1 and it wasn't committed yet.

Note: See TracTickets for help on using tickets.