In Drupal 8 if I want to stop images from printing width and height details I would add this to my mytheme.theme file:
function dumdumtheme_preprocess_image(&$variables) {
if (isset($variables['attributes']['width']) && isset($variables['attributes']['height'])) {
unset($variables['attributes']['width']);
unset($variables['attributes']['height']);
}
}
In my Backdrop theme/mytheme directory I have tried adding a file: themesettings.php and including the above code in there.
But it does not work (width and height code is still being generated in the HTML output).
Where or how would I achieve this in Backdrop?
Comments
Backdrop is much closer to Drupal 7 than Drupal 8, so you'd do the same in Backdrop as you would in Drupal 7: https://www.drupal.org/docs/7/theming/howto/overriding-theme-templates-in-drupal-7
So what you're looking to create is a 'template.php' file in your theme's root directory.