It happens sometimes when uploading the images.
See the screenshot.

The code:

function imageapi_image_scale(&$image, $width = NULL, $height = NULL, $upscale = FALSE) {
  $aspect = $image->info['height'] / $image->info['width'];

CommentFileSizeAuthor
#1 vsf.jpg68.32 KBdhnmya
Picture 19.png62.75 KBkenorb
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

dhnmya’s picture

Title: Warning: Division by zero in imageapi_image_scale() (line 222 of imageapi/imageapi.module) » warning: Division by zero in /var/www/default/modules/imageapi/imageapi.module on line 221.
FileSize
68.32 KB

Please Help me to fix this problem....It's urgent....Please......

tarto’s picture

Try to install the php5-gd package on your server.
It worked for me.

vipin.mittal18’s picture

GD is already installed on my system. I transferred my files from development to production environment.
Both the environment are same but somehow uploading image showing an error " warning: Division by zero in /web/thecabin.net/htdocs/sites/all/modules/contrib/imageapi/imageapi.module on line 221."

Please help me in this.

Thanks in advance

vipin.mittal18’s picture

Issue summary: View changes

added code

Becker-and-Becker’s picture

we have the same issue and php-gd is installed on our server. Our server is on a shared hosting and so we do not have easy access to install libraries. Is there something else we can do to find out why this is happening, so that we may be able to fix it.

NancyDru’s picture

kenorb’s picture