What you can do is generate your images in a programming language with headers to stop indexing and then use some rewriterules to reference that image.
For example. Put this in your .htaccess:
RewriteRule ^(.*)\.jpeg$ /background.php?FILE=$1 [L]
Then create the file background.php with this template:
header('X-Robots-Tag: noindex, noimageindex',true);
Put .htaccess and background.php in document root folder. Now when you make a request to anything ending in .jpeg from your document root, it will try to find the jpeg file in the /server-path/to/imagefolder folder and then the program adds an extra header to direct search engines not to index that specific file.
If you want something super easy, then divide your images into separate folders and indicate the folder that is not to be indexed in robots.txt.