Drupal image clean url fix

How to remove the ?itok******* from image clean url in drupal 7?

Follow this:

  1. Add this code to your settings.php file:
    $conf['image_allow_insecure_derivatives'] = TRUE;
  2. overwrite your image module (your website root directory:/modules/image/image.module ) line 1029,
    change from  return $file_url . (strpos($file_url, '?') !== FALSE ? '&' : '?') . drupal_http_build_query($token_query);
    to:
     return $file_url;
  3. save it, and upolad to overwrite oraginal image.module file.
  4. clean website cache
  5. Done!

If you don't know why should do this, google your websites image in image.google.com....

分类: