[wp-trac] [WordPress Trac] #50543: Media: wp_image_src_get_dimensions() may throw warning or return wrong values

WordPress Trac noreply at wordpress.org
Thu Jul 2 23:06:03 UTC 2020


#50543: Media: wp_image_src_get_dimensions() may throw warning or return wrong
values
-------------------------------------------------+-------------------------
 Reporter:  azaozz                               |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  5.5
Component:  Media                                |     Version:  trunk
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing needs-unit-  |     Focuses:
  tests                                          |
-------------------------------------------------+-------------------------

Comment (by azaozz):

 In 50543.1.diff: also account for edge case when an uploaded image is
 smaller than the smallest sub-size (`$image_meta['sizes']` is empty). We
 still need the width and height if the file and path matches.

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


More information about the wp-trac mailing list