Make WordPress Core

Opened 6 hours ago

Last modified 5 hours ago

#63015 new enhancement

Handle more content-disposition format on dowload_url

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

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
5 hours 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.