I have a css file that refers to images.
.test{
background: url(http://site.com/dynamic/test.jpg) no-repeat;
}
However, these images are dynamic. They change every minute, so I have to generate and maintain them using php. This means that I do not save them in a shared folder. I just serve them directly from a php script.
The problem is that when I visit php script ( http://site.com/dynamic/test.jpg), it creates the image correctly and I see it in the browser, but when the same URL is used in the css file as I need, css cannot access the images.
I think this is because the image is not saved in the shared folder and delivered to php, which means that the image must be called directly to generate it, and the css file call didn’t actually get into the php script (image URL).
Does anyone have any ideas to solve this problem?
source
share