Using a direct URL to Alfresco does not have a long stable shelf life, and will stop working after some time. There is no authentication challenge response for these URLs - meaning that if you are not already logged into the LCMS then you won't be able to see the content (which is a good thing as it keeps your content secure). If there are other images on the page that do use a correct Andresco link which will log the user back into the LCMS, then a page refresh will work. If all the images are using direct URLs then a page refresh would not log the user into the LCMS. This makes them very inconsistent to use.
The direct URL never works in Moodle Mobile app.
Don't use direct URLs to the LCMS.
URL generated by the file picker
Instead of direct links, use the URL as generated by the file picker.