[wp-trac] [WordPress Trac] #62094: /wp-json/oembed/1.0/embed returns too big thumbnail_url

WordPress Trac noreply at wordpress.org
Mon Sep 30 11:59:20 UTC 2024


#62094: /wp-json/oembed/1.0/embed returns too big thumbnail_url
--------------------------+------------------------------
 Reporter:  colinleroy    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Embeds        |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------

Comment (by colinleroy):

 For now I'm working around that with a filter in functions.php, but that
 is suboptimal:


 {{{
 function fix_image_downsize_99999($downsize, $id, $size) {
   if (is_array($size) && isset($size[1]) && $size[1] == 99999) {
     $size[1] = 0;
     return image_downsize($id, $size);
   }
   return $downsize;
 }
 add_filter( "image_downsize", "fix_image_downsize_99999", 10, 3 );
 }}}

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


More information about the wp-trac mailing list