Time for action — creating a programmatic custom image style
Now, we will see how you add a custom image style with code.
- The first thing we need to do is delete the small image style that we just created. So, open our d7dev site in your favorite browser, click on the Configuration link in the Admin toolbar, and then click on the Image styles link under the Media section.
- Once the Image styles administrative page has loaded, click on the delete link for the small image style that we just added.
- Next, on the Optionally select a style before deleting small page, leave the default value for the Replacement style select list to No replacement, just delete, and click on the Delete button.
- Now that we have cleared the way to replace our custom image styles ...