class renaming is irrelevant. calibre does not care about class names. It merges styles using css selector specificity and once all the merging is done it then generates new class names for the merged styles.
If your extra css is not not being applied to the second image it is not because its class name is changed, it will be for some other reason. I dont have the time to look at it right now, but if you just want to hack it, simply add code to remove the classnames you dont want from the images' class attribute to postprocess_html in your recipe.
|