Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I saw someone had this problem in version 1, as did I so I just punted and went for version 2 but get the same error after saving (I used the shortened URL, but the embed code fails too):
Notice: getimagesize() [function.getimagesize]: Read error! in image_gd_get_info() (line 349 of /usr/local/www/apache22/data/modules/system/image.gd.inc)
Using a standard image field with display format set to "rendered file". Video full-size image displays and the video plays ok.
PHP: 5.3.8
GD: bundled (2.0.34 compatible)
Comments
Comment #1
druplicate CreditAttribution: druplicate commentedExact dev version: 7.x-2.0-alpha2+31-dev
Comment #2
RobW CreditAttribution: RobW commentedLet's just bump the version to 7.x-2.x in the other issue (#1522348: Notice: getimagesize read error in image_gd_get_info() line 349 ) and continue there.
Comment #3
j0rd CreditAttribution: j0rd commentedso function image_gd_get_info($image) calls getimagesize() on $image->source.
When using media_youtube $image->source is set to something like "youtube://v/wTaXI9LUugc"
Get image size obviously doesn't understand this URL. Which is why it fails.
I assume this is a problem with either media or media_youtube passing in the wrong / invalid data to image_get_info(), and not really a problem with image_gd_get_info().
Comment #4
benjohnstone CreditAttribution: benjohnstone commentedSo yeah, had this same issue. Fixed it by adjusting the display settings for the field to be 'rendered file', not 'image'
Comment #5
benjohnstone CreditAttribution: benjohnstone commentedI eat my words, still get the error when adding a video, but only when saving the content. Simply viewing it is fine
Comment #6
DamienMcKennaI wonder if it's a limitation in either PHP or the Media / File Entity modules? getimagesize() is supposed to support stream wrappers.