[wp-meta] [Making WordPress.org] #7904: Photo dimensions incorrectly validated

Making WordPress.org noreply at wordpress.org
Mon Feb 10 14:28:45 UTC 2025


#7904: Photo dimensions incorrectly validated
-----------------------------+-------------------------
 Reporter:  benniledl        |      Owner:  (none)
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:
Component:  Photo Directory  |   Keywords:  needs-patch
-----------------------------+-------------------------
 wp_get_attachment_metadata() retrieves the metadata of the scaled version
 of uploaded images, not the original.
 https://github.com/WordPress/wordpress.org/blob/c4d8d5902c132eb79729c3473d94426926b16dc0/wordpress.org/public_html
 /wp-content/plugins/photo-directory/inc/uploads.php#L693

 Thus even tho the original does meet the 2000px minimum requirement, the
 scaled version might not and thus the image is rejected.

 I tested this by installing the plugin wp-frontend-uploader on a test
 site, uploading a photo, and checking the metadata with
 wp_get_attachment_metadata
 The metadata returned dimensions of the ***-scaled.jpg version instead of
 the original.

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/7904>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list