Support » Plugins » Image downsizing in my plugin

  • Hi,

    I’m writing a plugin and in which I need to resize an image located in my wp-content/uploads/ folder.

    So I’m trying to use the image_resize() function from the wp-includes/media.php file. But I get the following error:

    Call to undefined function wp_load_image() in /wp-includes/media.php

    here is my plugin code:

    function addEnclosure() {
    	foreach((get_the_category()) as $category) {
        	if  ($category->cat_ID == 1) {
    	if ($isvideo >= 1) {
    		$image = 'my image url';
    		$imageThumb = image_resize($image, 50, 50, true, 'feed', null, 90);

  • The topic ‘Image downsizing in my plugin’ is closed to new replies.