wp_image_maybe_exif_rotate WordPress Filter Hook

The wp_image_maybe_exif_rotate hook is used to check if an image needs to be rotated based on EXIF data. If the image needs to be rotated, the function will update the database and return the new image URL.

apply_filters( 'wp_image_maybe_exif_rotate', int $orientation, string $file ) #

Filters the $orientation value to correct it before rotating or to prevent rotating the image.


Parameters

$orientation

(int)EXIF Orientation value as retrieved from the image file.

$file

(string)Path to the image file.


Top ↑

Source

File: wp-includes/class-wp-image-editor.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.