If you insist on converting the imaes to grayscale in Photoshop you can take this approach:
Place all original color images in a folder (and name it something like ‘color images’).
Whenever you convert an image to grayscale in Photoshop, save it to a separate folder (called ‘b&w images’). But here’s the catch: Leave the file name of the image intact! So for example, if the original image’s file name is ‘background2.jpg’ then the converted grayscale image should have the exact same file name (‘background2.jpg), but saved in the ‘b&w images’ folder.
And here’s the cool part. When you place the images into the document, select it from the ‘color’ folder, So all the images in the document will be color. Then you can export it to epub. When when you’re ready to export to pdf do the following: In the Links panel select all the image links that you want to change to grayscale, in the panel flyout menu select ‘Relink to Folder’, and browse and select the ‘b&w images’. In a second all the images will change to the grayscale version. To switch back to the color version you do the same but now you choose the ‘color images’ folder.