Hi Dalx Cortes,
You can try the widget https://marketplace.mendix.com/link/component/116935
If you are using the Image Viewer widget, it needs to be a System.Image object.
The System.Image entity is a specialisation of System.FileDocument, so if you can work with them just like System.FileDocument objects.
How does the data get into your application? It sounds like you maybe using a generic upload so you can’t differentiate between images and other types of file. Could you separate the upload into images and other types? It would make it easier to work with the different file types.