Make WordPress Core

Opened 18 months ago

Last modified 18 months ago

#63015 new enhancement

Handle more content-disposition format on dowload_url

Reported by: Rahe Owned by:
Priority: normal Milestone: Awaiting Review
Component: General Version:
Severity: normal Keywords:
Cc: Focuses:

Description

Hello,

In changeset 51939 content-disposition "attachment; filename=" have been supported for download_url function

We could handle the content-disposition "inline; filename=" too that instead of forcing the browser to download the image just to displaying it.

Some systems like imgProxy (imgproxy.net) are returning this kind of header when serving the same asset but with another filetype as the original one (avif instead of jpg).

Nicolas,

Change History (1)

#1 @siliconforks
18 months ago

Note that the Content-Disposition support for download_url() is fundamentally defective: #60788

I definitely don't think it's a good idea to expand it any further (I would argue that it should be reverted entirely).

Note: See TracTickets for help on using tickets.