Mengatasi Warning: Division by zero in theme_image_style_preview() line 772 of image.admin.inc

webadmin's picture

Saat anda melakukan resize dengan Image Styles Drupal yang merupakan bagian dari module inti/core Drupal 7 (pada Drupal 6 merupakan module tambahan dengan nama ImageCache) mungkin anda menjumpai error ini:

Warning: Division by zero in theme_image_style_preview() (line 772 of /modules/image/image.admin.inc).
Warning: array_intersect_key(): Argument #1 is not an array in theme_image_style_preview() (line 774 of modules/image/image.admin.inc).

Kadang ada tambahan berupa error ImageMagik. Cara mengatasinya sbb:

  1. Jika library ImageMagik belum terinstall mk install dengan:
    # apt-get install imagemagik
  2. Periksa folder sites/default/files/style, ubah ke 775, terutama folder dengan nama sesuai Image Styles

Semoga bermanfaat (Wendy William).

Warning: Division by zero in theme_image_style_preview() (line 769
of /var/www/html/drupal7/drupal/modules/image/image.admin.inc).
Warning:
array_intersect_key(): Argument #1 is not an array in
theme_image_style_preview() (line 771 of
/var/www/html/drupal7/drupal/modules/image/image.admin.inc).