Is it possible, via CSS (potentially using generated content) to remove or change the src reference in the markup below?
The easy thing to do would be to change the markup, however, this code is in the wild and I need to deal with it as it is, so I’m trying to remove the image and use a background image instead.
CSS doesn’t have ANYTHING to do with content. So the answer is NO. If you use JS to alter the SRC, you don’t need CSS.
That being cleared up. You can use a spaceball.gif. That is a transparent GIF as a place holder. CSS does control an IMGs height and width ( or in this case an INPUT) and you can use a BG image on an image ( tho normally the BG is covered up by the image itself, but since the spaceball.gif is a 1px X 1px transparent gif you dont have to worry about that).
All you do is set the width and height to zero so that no image shows. Then you increase the padding to the same size of the image that you want to display and apply a background image as usual. The foreground image is hidden and the new background image is shown instead.