Hello ggppdk,
thank you for your fast reply.
Indeed, the fact of having joomla in a subfolder was not a problem, this was actually the situation when I had it in test mode in my subdomain.
However, the problem seems to be with the fact that I am redirecting the root domain to the mainsite directory.
The Path to secure files folder and Path to media files folder are relative and are working correctly:
This message contains confidential information
However, when declaring the same path in the image field for thumbnailing, the result is as in the picture attached
This message contains confidential information
The same thing happens with the images in the categories.
To be noticed that the same images are used in html modules in other places of the website via the core joomla administration, and they work fine.
This is why I thought that it might have some to have with the way the htaccess file was configured for the redirect. I am not an expert and I may have set something wrong. Please help!
Thanks!