Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#43543 closed feature request (duplicate)

New filter for output of wp_get_attachment_image function

Reported by: sebastianpisula's profile sebastian.pisula Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.1
Component: Media Keywords: has-patch
Focuses: Cc:


I suggest add new filter attachment_image_html for output of wp_get_attachment_image function with parameters $html, $attachment_id, $attr, $size .

Example of usage: I can check that file is svg, if true then output content of this file else display <img...

Attachments (1)

43543.patch (933 bytes) - added by sebastian.pisula 6 years ago.

Download all attachments as: .zip

Change History (3)

#1 @mukesh27
6 years ago

  • Keywords has-patch added

#2 @birgire
6 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

@sebastian.pisula Thanks for the ticket and the patch.

This is feature request has already been posted here #27399.

You're welcome to join in there.

Note: See TracTickets for help on using tickets.