You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Standalone code, or other way to reproduce the problem
$image = new Imagick("http(s)://any.url/image.jpg");
Expected result
Imagick object is instantiated.
Actual result
Exception ImagickException with message 'Invalid filename provided' in ...
Ran into this with a failed test when fixing https://core.trac.wordpress.org/ticket/35973 for WordPress 4.5. Previously, a bug had kept WordPress from selecting Imagick as its image editing library, hiding this particular issue. The image URL used in that test is https://asdftestblog1.files.wordpress.com/2008/04/canola.jpg.
I took a quick look under the hood and the Imagick:: constructor verifies and then provides the string to imagemagick's MagickSetImageFilename() which only accepts a filename, not a URL.
My initial thought is it might be possible to hand off MagickReadImageFile() a php stream of the URL as it will take a file descriptor - however I would first need to verify if HHVM's stream properly support http(s), I seem to remember it doesn't?
i've had the same issue with this. exact same bug. the only work around i found for wordpress and hhvm with remote stream (i'm using a custom stream wrapper for google cloud!!) is to switch to gd by using the filter:
add_filter( 'wp_image_editors', function($ar) {
return ['WP_Image_Editor_GD'];
}
The gd version loads the file using file_get_content into memory which is not as desirable. i tried to see if i can fix the issue by patching HHVM but it went over my head. lol so i'm sticking with GD for now.
HHVM Version
HipHop VM 3.12.1 (rel)
Standalone code, or other way to reproduce the problem
$image = new Imagick("http(s)://any.url/image.jpg");
Expected result
Imagick object is instantiated.
Actual result
Exception
ImagickException
with message 'Invalid filename provided' in ...Ran into this with a failed test when fixing https://core.trac.wordpress.org/ticket/35973 for WordPress 4.5. Previously, a bug had kept WordPress from selecting Imagick as its image editing library, hiding this particular issue. The image URL used in that test is
https://asdftestblog1.files.wordpress.com/2008/04/canola.jpg
.Possibly Related: #3451
The text was updated successfully, but these errors were encountered: