WordPress.org

Ready to get started?Download WordPress

Codex

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().

Description

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

Usage

<?php wp_load_image$file ); ?>

Parameters

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

Return Values

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

Change Log

Source File

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

Related

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