Viewing 6 replies - 1 through 6 (of 6 total)
  • What version of WordPress are you using?

    Thread Starter Taras Dashkevych

    (@taskotr)

    Version 3.8.1

    Thread Starter Taras Dashkevych

    (@taskotr)

    I checked tiled-gallery.php file and found image_resize function on line 207

    Re-upload a fresh, unpacked, copy of the plugin’s folder to wp-content/plugins using FTP or whatever file management application your host provides.
    http://wordpress.org/plugins/tiled-gallery-carousel-without-jetpack/

    g31st

    (@g31st)

    Hello,

    i’ve got the same error when WP_DEBUG is ‘true’…
    Using a fresh installation of WordPress 3.8.1 and tiled-gallery-carousel-without-jetpack 1.2

    tiled-gallery.php contains image_resize() deprecated function.

    Will you update the plugin soon ?

    Thanks.

    g31st

    (@g31st)

    Finally i found a solution using new WP_Image_Editor

    I modified tiled-gallery.php start at line 207, the code below :

    $new_img_path = image_resize( $file_path, $width, $height, $crop );
    $new_img_size = getimagesize( $new_img_path );
    $new_img = str_replace( basename( $image_src[0] ), basename( $new_img_path ), $image_src[0] );

    …should be something like :

    $new_img = '';
    $new_img_size = array(
    	0 => 0,
    	1 => 0
    );
    $image = WP_get_image_editor( $file_path );
    if ( ! is_wp_error( $image ) ) {
    	$image->resize( $width, $height, $crop );
    	$saved_image = $image->save();
    	$new_img = str_replace( basename( $image_src[0] ), basename( $saved_image['path'] ), $image_src[0] );
    	$new_img_size[0] = $new_img['width'];
    	$new_img_size[1] = $new_img['height'];
    }

    Works fine…

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘image_resize is deprecated’ is closed to new replies.