[wp-trac] [WordPress Trac] #31228: The "+" character in add_image_size breaks wp_get_attachment_image

WordPress Trac noreply at wordpress.org
Thu Feb 5 10:42:02 UTC 2015


#31228: The "+" character in add_image_size breaks wp_get_attachment_image
-------------------------------+------------------------------
 Reporter:  ashorlivs          |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Media              |     Version:  4.1
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------

Comment (by ashorlivs):

 Hi Joe,
 here's a dump:


 {{{
 array(5) {
   ["width"]=>
   int(500)
   ["height"]=>
   int(481)
   ["file"]=>
   string(45) "2015/02/4b678e6675f1613431a876086766d29a.jpeg"
   ["sizes"]=>
   array(27) {
     ["thumbnail"]=>
     array(4) {
       ["file"]=>
       string(45) "4b678e6675f1613431a876086766d29a-150x150.jpeg"
       ["width"]=>
       int(150)
       ["height"]=>
       int(150)
       ["mime-type"]=>
       string(10) "image/jpeg"
     }
     ["medium"]=>
     array(4) {
       ["file"]=>
       string(45) "4b678e6675f1613431a876086766d29a-300x289.jpeg"
       ["width"]=>
       int(300)
       ["height"]=>
       int(289)
       ["mime-type"]=>
       string(10) "image/jpeg"
     }
     ["News - Bloc 2 - Full image"]=>
     array(4) {
       ["file"]=>
       string(45) "4b678e6675f1613431a876086766d29a-319x135.jpeg"
       ["width"]=>
       int(319)
       ["height"]=>
       int(135)
       ["mime-type"]=>
       string(10) "image/jpeg"
     }
     ["News - Bloc 2 - Image et texte"]=>
     array(4) {
       ["file"]=>
       string(44) "4b678e6675f1613431a876086766d29a-92x135.jpeg"
       ["width"]=>
       int(92)
       ["height"]=>
       int(135)
       ["mime-type"]=>
       string(10) "image/jpeg"
     }
     ["News - Bloc 2 - Image + texte"]=>
     array(4) {
       ["file"]=>
       string(37) "4b678e6675f1613431a876086766d29a.jpeg"
       ["width"]=>
       int(500)
       ["height"]=>
       int(841)
       ["mime-type"]=>
       string(10) "image/jpeg"
     }
   }
   ["image_meta"]=>
   array(11) {
     ["aperture"]=>
     int(0)
     ["credit"]=>
     string(0) ""
     ["camera"]=>
     string(0) ""
     ["caption"]=>
     string(0) ""
     ["created_timestamp"]=>
     int(0)
     ["copyright"]=>
     string(0) ""
     ["focal_length"]=>
     int(0)
     ["iso"]=>
     int(0)
     ["shutter_speed"]=>
     int(0)
     ["title"]=>
     string(0) ""
     ["orientation"]=>
     int(0)
   }
 }
 }}}

 Same with:


 {{{
 var_dump( wp_get_attachment_image_src( 594, 'News - Bloc 2 - Image +
 texte'));
 }}}

 My `add_image_size` are placed in a custom plugin instead of a theme, and
 I'm using the Advanced Custom Forms plugin. Hope it helps!

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


More information about the wp-trac mailing list