Since this morning, I try to know why this error on my wordpress fresh install.
It appends when I try to put an image on the post preview.
The preview does not work because the url is bad on the src on
<img src="http://myname.com/wp-content/uploads/2012/12/" width="" height="" style="position: absolute; opacity: 0;"/>
The apache2 log:
[Sun Dec 09 15:54:44 2012] [error] PHP Warning: getimagesize() expects parameter 1 to be string, object given in /var/www/wordpress/wp-content/themes/montezuma/includes/thumb.php on line 222
[Sun Dec 09 15:54:44 2012] [error] PHP Warning: basename() expects parameter 1 to be string, object given in /var/www/wordpress/wp-content/themes/montezuma/includes/thumb.php on line 223
My php version:
PHP 5.3.3-7+squeeze14 with Suhosin-Patch (cli)
My wordpress version:
Version 3.4.2
Lines in thumb.php:
220 // no cache files - let's finally resize it
221 $new_img_path = image_resize( $file_path, $width, $height, $crop );
222 $new_img_size = getimagesize( $new_img_path );
223 $new_img = str_replace( basename( $image_src[0] ), basename( $new_img_path ), $image_src[0] );
Any idea?
I found the solution for my exact same problem.
Image needs to be at least 900px wide when uploading it.