Jump to content

Allow SVG for category images


Recommended Posts

Hello,

 

I need to use svg images as category thumbnails and would like to know if there is a way to do so?

 

When i tried to upload the svg image, Prestashop gave me this error : 

 

Unknown image format : accepted format : GIF, JPG, PNG

 

I checked and it seems that the SVG format is activated in the Prestashop file manager, so why do I get an error message?

 

Thank you in advance for your help,

 

Best regards,

 

Julien

Link to comment
Share on other sites

PrestaShop doesn't support SVG for categories, products, manufacturers, etc. You'll need to override the image links in category.tpl with your own links. For example, {$img_dir}svg/{$category.id_category}.svg{/if} if you want to create a themes/<your_theme>/img/svg/ subdirectory and put all the category SVGs in there.

Link to comment
Share on other sites

Hello,

 

Thank you for your answers.

 

Rocky, yes this is what I ended up doing but in a module. I just wanted to find a way for the client to upload the files easily instead of using ftp but that's not possible.

 

Vekia, ok I understand better now. The weird thing though is that I can upload a svg file in a cms page without any problems.

Link to comment
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...