Kode Plex
Kode Plex

Reputation: 47

The CakePHP css image path is not working

I downloaded CakePHP 2.2.3 and I'm setting up my new site. However, I'm facing problems in calling the images from view/webroot/img/logos/filename.jpg in the CSS file. In the CSS file, I'm using this path: background: url("../img/logos/filename.jpg"), but the image doesn't show up. In earlier versions of CakePHP it works fine. How do I resolve this problem?

Upvotes: 0

Views: 2008

Answers (1)

Greg Motyl
Greg Motyl

Reputation: 2555

I'm assuming that your image is realyy in app/webroot/img/logos/filename.jpg where it should be in standard configuration (not in view/webroot/img/logos/filename.jpg as you have written)

Your implementation is correct, this should work for CakePHP 2.2.3 exacly the same way. Check perrmisions to the file, web server need to have read rights to your file:app/webroot/img/logos/filename.jpg

Upvotes: 1

Related Questions