Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jpamental
Created January 10, 2015 23:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpamental/bc17c923142629b32f1d to your computer and use it in GitHub Desktop.
Save jpamental/bc17c923142629b32f1d to your computer and use it in GitHub Desktop.
Simple function to go in your template.php file to keep Drupal from inserting height/width into image tags.
function themename_preprocess_image(&$variables) {
foreach (array('width', 'height') as $key) {
unset($variables[$key]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment