/img_resize

Function for resizing images on the fly in WordPress with resized image caching.

Primary LanguagePHPMIT LicenseMIT

img_resize

To use this in a WordPress theme, simply include it in the functions.php file:

include 'include/img_resize.php';

Usage

Arguments

img_resize($imageURL, $width, $height, $crop = false);

Height can be left null to change height proportional to width.

Example

$headerImage = img_resize(get_theme_mod('header_image'), 200, null);