What to do: add a new image size and grayscale this specific size.
What I’ve done so far:
I’ve been searching around and found this helpfull URLs:
wpbeginner, Ryan Berry. The second solution creates a grayscale image for each size on every new image and is nearly what I’m searching for.
The Problem: I know how to add a new image size and the above functions creating grayscale images. What I don’t know is how to add this filter just to a specific size.
Using the code from wpbeginner, it seems it only grayscales image which is specified as
themename-bw-image, as seen from here (line 04):So I suppose if you don’t want the image to get grayscaled, you could add a new image size: