This project is not covered by Drupal’s security advisory policy.

This is a super simple utility module which allows any enabled theme to:

  1. Declare new image styles
  2. Reliably alter the configuration of any existing image styles

Usage

  1. Install this module
  2. Ensure your theme is enabled,
  3. On the settings page for your theme, ensure the "Allow this theme to declare image styles" and/or "Allow this theme to alter image styles" box is ticked, as your needs require.
  4. Create a file of the following name at the ROOT of your theme directory:

    THEMENAME.image_styles.inc

  5. Implement whichever of the following two hooks you need:

    THEMENAME_theme_image_default_styles()

    THEMENAME_theme_image_styles_alter()

    These hooks correspond with the usual image module hooks, with a slight name
    change to avoid conflicts. See image_styles_by_themes.api.php for more info.

  6. Clear caches!

Warning

As soon as you disable your theme, all image styles it declared will be removed
from the system. This may lead to seriously broken content if they were being
used.

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • caution Maintenance fixes only
    Considered feature-complete by its maintainers.
  • chart icon1 site reports using this module
  • Created by jamsilver on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases