WordPress.org

Make WordPress Core

#43543 closed feature request (duplicate)

New filter for output of wp_get_attachment_image function

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

Description

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 18 months ago.

Download all attachments as: .zip

Change History (3)

#1 @mukesh27
18 months ago

  • Keywords has-patch added

#2 @birgire
18 months 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.