Title: Calling WP_Image_Editor() in Multisite
Last modified: August 20, 2016

---

# Calling WP_Image_Editor() in Multisite

 *  Resolved [jacobraccuia](https://wordpress.org/support/users/jacobraccuia/)
 * (@jacobraccuia)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/calling-wp_image_editor-in-multisite/)
 * I’ve been building a plugin, and in the display shortcode, I’ve used this code
   to get the image size.
 * $image = wp_get_image_editor(‘url’);
    if (!is_wp_error($image)) { $img = $image-
   >get_size(); $imgwidth = $img[‘width’]; $imgheight = $img[‘height’]; }
 * It works perfectly on my personal site, which is single user. On multisite however,
   also running on 3.5.1, it fails, claiming that WP_ERROR method does not exist.
 * Any ideas or fixes?

Viewing 1 replies (of 1 total)

 *  Thread Starter [jacobraccuia](https://wordpress.org/support/users/jacobraccuia/)
 * (@jacobraccuia)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/calling-wp_image_editor-in-multisite/#post-3542944)
 * Just solved this actually.
 * I was sending the URL through, and not the directory. Changed to the directory
   and it works lovely.

Viewing 1 replies (of 1 total)

The topic ‘Calling WP_Image_Editor() in Multisite’ is closed to new replies.

## Tags

 * [method](https://wordpress.org/support/topic-tag/method/)
 * [size](https://wordpress.org/support/topic-tag/size/)
 * [wp_image_editor](https://wordpress.org/support/topic-tag/wp_image_editor/)

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 1 reply
 * 1 participant
 * Last reply from: [jacobraccuia](https://wordpress.org/support/users/jacobraccuia/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/calling-wp_image_editor-in-multisite/#post-3542944)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
