[wp-trac] [WordPress Trac] #42745: Pass $attachment_id to intermediate_image_sizes_advanced filter

WordPress Trac noreply at wordpress.org
Wed Nov 29 12:13:01 UTC 2017


#42745: Pass $attachment_id to intermediate_image_sizes_advanced filter
-----------------------------+-----------------------------
 Reporter:  robbie505        |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Post Thumbnails  |    Version:  2.9
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 I'm requesting that the following patch be added, which simply passes the
 $attachment_id of the image to be used for the new post thumbnail sizes to
 the '''intermediate_image_sizes_advanced''' filter in the
 ''wp_generate_attachment_metadata'' function.

 The purpose of this is for unsetting intermediate sizes based on
 conditions for specific images. For example, I have a need for creating
 large private galleries with thumbnails-only. So to save hosting storage,
 I could unset several image-sizes in the '''$sizes''' array, depending on
 a post_meta of the '''$attachment_id'''.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42745>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list