Support for custom SVG icons

Hello,

DHIS2 version 41 has a maintenance feature that allows uploading custom icons. However, the feature is limited to .png files. Are there plans to support other image formats, such as .svg?

Thanks!

1 Like

Hi @nnkogift

Great to know you are exploring this feature. Are you using it directly using the Maintenance app interface? I tried to ‘upload’ an svg image and it appeared in the ‘preview’ box but it won’t upload so I’m not sure what’d be the main purpose for restricting it to PNG. Would you like to explain why PNGs aren’t working in your use case?

In the case that your icons are ready, if you use Figma, it’s easy very easy to drag and drop your SVG icons and then export them all as .png files, would that solve the issue?

Thanks!

I met the same error. I believe the API is configured to limit only .png files. I also tried with the API directly and it returns the same error.

We are working on a custom application allowing users to upload a custom icon, and the icon has to allow changing of color and size, which is possible with SVG images but not PNG images.

We are currently opting to use document resources for this, but I just wanted to know if there is already plans to support this through the custom icons.

1 Like