WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #53475, comment 12


Ignore:
Timestamp:
06/22/2021 09:31:46 PM (7 months ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #53475, comment 12

    initial v1  
    22
    33Uh, there's a better way to do this, can use `wp_image_editor_supports()`. Will push an update to the PR.
     4
     5Yeah, been wondering if it would make sense to have a more generic function. Seems using `wp_image_editor_supports( array( 'mime_type' => 'image/webp' ) )` is good enough unless we want to cache the result to speed it up a bit.
     6
     7But then it is pretty fast already, and `get_allowed_mime_types()` doesn't seem to be used a lot, so... 50/50 in it :)