[wp-trac] [WordPress Trac] #62712: "Edit image" in Media Modal not work for PSD/SVG ( mime_type image/* )
WordPress Trac
noreply at wordpress.org
Fri Dec 20 04:57:29 UTC 2024
#62712: "Edit image" in Media Modal not work for PSD/SVG ( mime_type image/* )
-----------------------------+------------------------------
Reporter: Hrohh | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Post Thumbnails | Version: 6.7.1
Severity: minor | Resolution:
Keywords: | Focuses:
-----------------------------+------------------------------
Comment (by abcd95):
@Hrohh Thank you for providing the additional context and code. So, you're
exploring a solution to control the "Edit Image" button visibility based
on file editability rather than just mime type. Your approach is a clever
workaround. However, we might want to consider -
The current behavior in core relies on `wp_image_editor_supports()` for
checking editability, which correctly handles PSD files by returning
false.
Instead of modifying the media template directly, we could explicitly
define editable image types
Or extend the existing checks in `wp_attachment_is_image()` to consider
file editability
But I am sure there might be better ways and this can be explored further.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62712#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list