Jump to content

Absolute images paths and CSS compression

Recommended Posts

Hi there,


For a online catalog, I modified and customized the default Prestashop theme in order to make it looks like the main website. Because the catalog is on a sub-domain, unlike the main website, I used the full path for the main layout images, in order to avoid having duplicates and avoid our visitors to load twice the exact same images twice when they are coming from the main website and vice versa.


However, there is a problem when CCC is enabled for CSS. Every url() properties are modified so it adds the full path to the theme images folder (which I think is a bit stupid; if ones care about minifying and compressing the CSS files, it makes no sense using longer image URLs than those in the original, uncompressed CSS, which uses relative paths...)



So, in the case layout images being linked to the main website, the online store URL is added before. In the end, I get broken links, something that looks like this:




So as for now, I need to disable CSS compression, even thought everything else is compressed, which is kind of disappointing.


So, is there any way to prevent Prestashop from adding the full paths in the images? Or otherwise, any way to fix my issue without duplicating all my layout images?


Thanks in advance!

  • Like 1

Share this post

Link to post
Share on other sites

I am having the same exact problem. This issue is preventing me from storing images in a sub-domain or any other domain for that matter. I have rebuilt the htaccess file and tried most combos in the performance section of the admin area.

Share this post

Link to post
Share on other sites

Just updated from 1.4.7 to 1.5.3 and was disapointed to see that the issue is still present... :huh: I'm looking for a way to edit the PHP files so it will keep the relative path (again, that is very retarded, why using longer URLs in a minified CSS file?). I don't really know where to look tough..

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More