I am working on some existing ezpublish code base. I have two extension extA
and extB
. In templates of extA
i have this code in tpl.
<img src={"icons/test.png"|ezimage} height="75" width="75" />
Full path of this image becomes
mysite.com/extension/extA/design/extA/images/icons/test.png
Now i put the same image code inside a tpl of extB
. But now the image path resolves to
mysite.com/design/extB/images/icons/test.png
Why this path difference? Is there any settings inside ezpublish to control this?
Following links helped me to find the problem. https://doc.ez.no/eZ-Publish/Technical-manual/3.10/Reference/Template-operators/URLs/ezimage
If the operator is unable to find the specified file within the "images" subdirectory of the current design, it will attempt to locate it in the "images" subdirectory of the fallback designs or the standard design.
And
eZ Publish will look for designs in the directory "/extension/ extension_name/design/"
So it first tried to find in path mysite.com/extension/extB/design/extB/images/icons/test.png
and when the image is not there it tries to find from fallback mysite.com/design/extB/images/icons/test.png
My image was in first path but it still tried to find from fallback as cache was not updated. After clearing the cache image was found in the first path.