Hi,
New to Drupal, I'm failing importing images getting this message:

imagecreatefromjpeg() [function.imagecreatefromjpeg]: 'sites/default/files/images/temp/Yaks-0715_0.jpg' is not a valid JPEG file in .../includes/image.gd.inc on line 190.

Any suggestion?

Thanks in advance.

Comments

dan_metille’s picture

Actually, I've the following message with all jpg images that I've imported before (and who had no problem until yet):

warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg: JPEG library reports unrecoverable error: in .../includes/image.gd.inc on line 190.
warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: 'sites/default/files/images/100_1887.JPG_.jpg' is not a valid JPEG file in .../includes/image.gd.inc on line 190.
Unable to create scaled Thumbnail image.

Here is one url as sample : http://chaikhana.bodhi3.com/?q=image/tid/2

No problem with png files.

dan_metille’s picture

Version: 6.x-1.x-dev » 6.x-1.0-beta2

Tried to get back to version 6.102, the last who was working for me.
After update, got this message:

user warning: Duplicate column name 'weight' query: ALTER TABLE image_attach ADD `weight` INT NOT NULL DEFAULT 0 in /usr/local/www/vhosts/dmetille/chaikhana.bodhi3.com/htdocs/includes/database.mysql-common.inc on line 298.

with this failure:

image_attach module
Update #6102
ALTER TABLE {image_attach} DROP PRIMARY KEY
ALTER TABLE {image_attach} ADD PRIMARY KEY (nid, iid)
Failed: ALTER TABLE {image_attach} ADD `weight` INT NOT NULL DEFAULT 0

What should I do?

dan_metille’s picture

Version: 6.x-1.0-beta2 » 6.x-1.0-beta3
Status: Active » Closed (fixed)

Ok, change my Image API to ImageMagik and now it's working.