Title: &quot;error_loading_image&quot; in &quot;image_resize&quot; function
Last modified: August 20, 2016

---

# "error_loading_image" in "image_resize" function

 *  [pille72](https://wordpress.org/support/users/pille72/)
 * (@pille72)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/error_loading_image-in-image_resize-function/)
 * Hello
    i’m trying to build an plugin which selects the first image within a post,
   and resize it to my wanted width/height.
 * After i’ve implemented the function image_resize with my filepath i get the following
   error:
 * error_loading_image -> File ….. exists?
 * after a google marathon i haven’t found any solution.
    i found that the error
   message comes from the function “file_exists”…my file exists and there are 777
   permissions on uploads/ folder…
 * what can i do ? are my images blocked by safe_mods or something else?
 * thanks for help

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Joke Portegies](https://wordpress.org/support/users/joke-brandhorst-portegies/)
 * (@joke-brandhorst-portegies)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/error_loading_image-in-image_resize-function/#post-3024180)
 * I have the same problem. My file exists (I have retrieved the dimensions of the
   image) but the image_resize-function suggests that the file doesn’t exist. Does
   anybody have an idea?
 *  [Joke Portegies](https://wordpress.org/support/users/joke-brandhorst-portegies/)
 * (@joke-brandhorst-portegies)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/error_loading_image-in-image_resize-function/#post-3024181)
 * I’ve found it: the imagename had a “[http://”-string](http://”-string) in it 
   and the file_exists-function that is called from image_resize can’t handle http-
   protocol. After translating this to a relative pathname everything works fine.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘"error_loading_image" in "image_resize" function’ is closed to new replies.

## Tags

 * [file_exists](https://wordpress.org/support/topic-tag/file_exists/)
 * [images](https://wordpress.org/support/topic-tag/images/)

 * 2 replies
 * 2 participants
 * Last reply from: [Joke Portegies](https://wordpress.org/support/users/joke-brandhorst-portegies/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/error_loading_image-in-image_resize-function/#post-3024181)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
