Determines the maximum upload size allowed in php.ini.
* @since 5.6.0
*
* @param resource|GdImage|false $image A value to check the type for.
* @return bool True if `$image` is either a GD image resource or a GdImage instance,
* false otherwise.
*/
function is_gd_image( $image ) {
if ( $image instanceof GdImage
|| is_resource( $image ) && 'gd' === get_resource_type( $image )
) {
return true;
}
return false;
}
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_max_upload_size