[wp-trac] [WordPress Trac] #62385: Improve `WP_Image_Editor::generate_filename()` to support generating filenames without a suffix
WordPress Trac
noreply at wordpress.org
Mon Nov 11 21:36:03 UTC 2024
#62385: Improve `WP_Image_Editor::generate_filename()` to support generating
filenames without a suffix
-------------------------+--------------------
Reporter: azaozz | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 6.8
Component: Media | Version:
Severity: normal | Keywords:
Focuses: |
-------------------------+--------------------
Currently `WP_Image_Editor::generate_filename( $suffix = null, $dest_path
= null, $extension = null )` forces a dimensions suffix like `-600x800`
when a `$suffix` is not present or has a "falsey" value.
This makes it impossible to use the function to generate an image file
name without a suffix. However that functionality is required in some
cases like converting an image to a different format where a suffix is not
desirable, see https://github.com/WordPress/wordpress-develop/pull/7748.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62385>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list