Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp load image

This function has been deprecated. That means it has been replaced by a new function or is no longer supported, and may be removed from future versions. All code that uses this function should be converted to use its replacement if one exists. See also wp-includes/deprecated.php. Use any of these functions instead.

This function has been deprecated in favour of wp_get_image_editor().


Load an image from a string, if PHP supports it.


<?php wp_load_image$file ); ?>


(string) (required) Filename of the image to load.
Default: None

Return Values

The resulting image resource on success, Error string on failure.

Change Log

Source File

wp_load_image() is located in wp-includes/deprecated.php


See also index of Function Reference and index of Template Tags.