Add id to image inside views
If you add the "NID" field to your view's fields, (as the first entry, for reasons I won't get in to here),  you can then use the "rewrite output" function to attach a unique CSS ID using the NID to your image.