[wp-trac] [WordPress Trac] #51908: add_image_size not working with custom plugin code

WordPress Trac noreply at wordpress.org
Tue Dec 1 18:02:00 UTC 2020


#51908: add_image_size not working with custom plugin code
-------------------------------+------------------------------
 Reporter:  arpitgshah         |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  General            |     Version:
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------
Changes (by arpitgshah):

 * focuses:  docs =>
 * component:  Media => General


Comment:

 @audrasjb here we have some sample code,

 {{{#!php
 <?php
 add_action( 'init', 'custom_post_size', 0 );

 function custom_post_size() {
 add_image_size( 'custom-size', 220, 180, true );
 the_post_thumbnail( 'custom-size' );
 }
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51908#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list