Is there a solution to my dilemma regarding background images in a div? I need the image to be contained within the div if it's larger (background-size:contain;), but if the image is smaller, I want to keep it as is without stretching or blurring (background-size:auto;)
I am using a WordPress website, so I don't have control over the images in the long run, as they may change without needing a programmer's intervention. Is there a way to achieve this effect?