wpseek.com
A WordPress-centric search engine for devs and theme authors
_wp_get_image_suffix is private and should not be used in themes or plugins directly.
_wp_get_image_suffix › WordPress Function
Since6.1.0
Deprecatedn/a
› _wp_get_image_suffix ( $resized, $rotated )
Access: |
|
Parameters: (2) |
|
Returns: |
|
Defined at: |
|
Codex: |
Gets the suffix to use for image files based on resizing and rotating.
Related Functions: wp_get_image_mime, wp_getimagesize, wp_get_image_editor, wp_create_image_subsizes, wp_save_image_file
Source
function _wp_get_image_suffix( $resized, $rotated ) { if ( $resized && ! is_wp_error( $resized ) ) { // Append "-scaled" to the image file name. It will look like "my_image-scaled.jpg". // This doesn't affect the sub-sizes names as they are generated from the original image (for best quality). return 'scaled'; } if ( true === $rotated ) { // Append `-rotated` to the image file name. return 'rotated'; } if ( is_wp_error( $resized ) || is_wp_error( $rotated ) ) { // TODO: Log errors. } return ''; }