Expand my Community achievements bar.

SOLVED

Client Libraries Issue CQ 5.6.1

Avatar

Level 2

Hi I hope somebody can shed light on an issue i am having in CQ 5.6.1.

I have an issue referencing images in the DAM from client libraries stored in components. The URL path is incorrectly altered when the client library is generated.

The URLS are of the format.

url("/content/dam/company/emea/sprites/homepage-banner-sprite.png")
but it is changed to url("../../../content/dam/company/emea/sprites/homepage-banner-sprite.png")

In version 5.4 is did not alter URLS that where relative but started from the root.

I can think of a number of work arounds, but is there a proper way to address this issue?

 

Thanks.

D

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi D,

In CQ5.4 urls in embedded css files are rewritten relative to the clientlib folder's location. In CQ5.5 onwards this mechanism has been changed and relative paths specified in embedded css files are resolved against the individual css file's location.
Unfortunately there is no option to revert to previous version however you need to use relative paths some thing like "../../sprites/homepage-banner-sprite.png"

Thanks,

Sham

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

Hi D,

In CQ5.4 urls in embedded css files are rewritten relative to the clientlib folder's location. In CQ5.5 onwards this mechanism has been changed and relative paths specified in embedded css files are resolved against the individual css file's location.
Unfortunately there is no option to revert to previous version however you need to use relative paths some thing like "../../sprites/homepage-banner-sprite.png"

Thanks,

Sham