WordPress.org

Make WordPress Core

Opened 3 months ago

Last modified 6 days ago

#39980 assigned defect (bug)

Improve handling of image previews for non-image files

Reported by: azaozz Owned by: joemcgill
Milestone: Future Release Priority: normal
Severity: critical Version: 4.7
Component: Media Keywords:
Focuses: Cc:

Description

Follow up from #31050.

The changes to the image_downsize() and image_get_intermediate_size() functions introduced in [38949] added regressions to the 'image_downsize' and 'image_get_intermediate_size' filters, running them for non-image attachments.

Best option to fix this seems to be to introduce new function(s) with new filter(s) specifically for handling this case: adding image preview to non-image attachment.

This will fix the regressions, and will make it possible for plugins to hook into this functionality.

Change History (9)

#1 @azaozz
3 months ago

  • Severity changed from normal to critical

Severity is critical as there are regressions.

#2 follow-up: @johnbillion
3 months ago

Dupe of #39883?

#3 @azaozz
3 months ago

  • Summary changed from Improve to Improve handling of image previews for non-image files

#4 in reply to: ↑ 2 @azaozz
3 months ago

Replying to johnbillion:

Dupe of #39883?

Similar but not exact. A refactoring seems too big change for a dot version, on the other hand it seems the best action.

Last edited 3 months ago by azaozz (previous) (diff)

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


3 months ago

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


2 months ago

#7 @joemcgill
2 months ago

  • Owner set to mikeschroder
  • Status changed from new to assigned

Assigning to @mikeschroder since he's looking at the related ticket for 4.7.4.

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


8 days ago

#9 @joemcgill
6 days ago

  • Milestone changed from 4.8 to Future Release
  • Owner changed from mikeschroder to joemcgill
Note: See TracTickets for help on using tickets.