[wp-trac] [WordPress Trac] #26737: WP_Image_Editor should provide a query_formats function.
WordPress Trac
noreply at wordpress.org
Tue Dec 31 11:30:13 UTC 2013
#26737: WP_Image_Editor should provide a query_formats function.
-----------------------------+------------------------------
Reporter: dan.rossiter | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version:
Severity: normal | Resolution:
Keywords: |
-----------------------------+------------------------------
Comment (by markoheijnen):
I still don't see the use case. I did a project that I had to generate
thumbnails for TIFF images (not a web extension). Obviously then I check
for TIFF in the beginning and change the mime type on {{{save}}}. If I get
an error then the mime type isn't supported so I skip it. Also on plugin
activation I check with {{{ wp_image_editor_supports( array( 'mime_type'
=> 'image/tiff' ) ) }}} and if it's false I will disable the plugin again.
This is something you maybe can do too. You only provide a list with the
extensions you care about and let WordPress do it's own magic.
The current check method is flexible but not in the way to may prefer. If
we add a {{{query_formats}}} method then it still don't have any value for
you. You still need to loop all the existing image editors and combine the
array. What leads to another issue and that is requesting all the image
editors.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/26737#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list