Common Errors on Joomla’s Media Manager

We have been working on Joomla websites for a long time – so long that we have reached a point that we know the common errors in nearly every Joomla feature. Below are the top common errors that Joomla administrators face when they’re using the Media Manager (we’re also explaining how to fix them):

  1. Unable to upload file

    This error usually happens when the upload to the server fails. Possible causes are:

    • Apache has no write permissions to the tmp directory: All files uploaded to a Joomla website are first uploaded to the tmp directory and then moved to the final directory once the upload is complete. This can be easily solved by changing permissions to the tmp directory to 777.
    • Apache has no write permissions to the images directory: As stated above, when a file is uploaded to the images directory, it is first uploaded to the tmp directory, and then moved to the images directory. If Apaches has no write permissions to the images directory, then the move fails, and subsequently the upload fails. The solution to this problem is change the permissions on the images directory to 777.

  2. This file is too large to upload

    There are two reasons for this error to happen:

    1. The file size exceeds the maximum allowed file size defined in your Media Manager Options: If, for example, the value of Maximum Size (in MB) is 100 MB in your Media Manager Options page (the Media Manager Options page can be accessed going to the Media Manager in your Joomla’s backend, and then clicking on Options on the top right) and you are trying to upload a 200 MB file, then you will see this error. The solution to this problem is to increase the Maximum Size (in MB) value to something higher.
    2. The upload_max_filesize, the post_max_size, or the memory_limit values are smaller than the size of the uploaded file: Even if you have changed the maximum size of an uploaded file to a very high number in your Media Manager Options page it might be that your host has a set, unchangeable limit on the maximum upload size. If this is the case, then you will need to ask your host to increase the maximum upload size (usually shared hosts will refuse such requests), or bite the bullet and switch to a VPS or higher (such as a dedicated server).

    Now you might be thinking, OK – that would take care of upload_max_file_size, but what about post_max_size and memory_limit? Well, the post_max_size is the total size that your POST data can have (e.g. the text and the uploaded files), which means that even if the post_max_size is slightly higher than the size of the file being uploaded, it is possible for the upload to fail, because it takes into consideration the text being submitted as well in the POST data (such as hidden fields). The memory_limit is even worse, because it encapsulates the size of the file being uploaded, as well as the memory required to serve the page. So, in the latter case, if you’re uploading a file that is 80 MB in size, and the PHP directive memory_limit is 100 MB, then the upload might fail if the upload script consumes more than 20 MB of memory (excluding, of course, the size of the uploaded file).

    Note that in the case where the size of the file uploaded is lower than post_max_size and memory_limit but the upload fails because of the reasons above, then you will see the error: “Unable to upload file” instead of “This file is too large to upload”. This is because such errors are not caught by Joomla’s check.

  3. This file type is not supported

    You cannot just upload a random file type to Joomla – any file type that you upload must be explicitly listed in the Media Manager Options page in the Legal Extensions field. So if, for example, you’re trying to upload a docx file (MS Word Document) and you see this error, then all you need to do is to add docx to the Legal Extensions field so that Joomla’s Media Manager supports it.

  4. Not a valid image

    Joomla, by default, doesn’t allow non-image uploads in the Media Manager (it is called the media manager, after all). This is because of safety concerns. A possible scenario where these safety concerns are valid is a disgruntled employee (who happens to have administrative access to your website) uploading (through Joomla’s Media Manager) a malicious PHP file that just deletes all the files that Joomla has write access to.

    An example in action where you will see this error is when you try to upload the docx file (even after adding docx to the Legal Extensions as per the above). Even though docx is now a legal file type, the upload fails because the file you’re trying to upload is not an image.

    This problem can be easily addressed by modifying Joomla’s Media Manager settings to allow uploads of non-image files. This can be done by logging in to the backend, clicking on the Options button on the top right, and then clicking on No next to Restrict Uploads. It’s that simple!

The above are the most common errors that Joomla administrators see when working on the Media Manager component. But, there is one subtle issue (it’s not really an error) where the upload fails without any error, it’s the http/https issue…

But what is the http/https issue?

The http/https issue is when the website is forced to work in https mode but the $live_site variable in the configuration.php file points to the http version of the website. When this is the case, all files uploaded through the Media Manager are processed through the https version of the website, but are submitted to the http version of the website. Since the latter version is not aware of the upload, the upload fails and the website is redirected back to the https version. This is a nasty bug in Joomla and fixing it require some changes to a core file. (Note: Changing the $live_site variable in Joomla means that even the frontend will work in https, which is typically not the desired behavior.)

If the latter problem is what is happening on your website, or if you need help with Joomla’s Media Manager, then feel free to contact us. Our rates are affordable, our work is professional, we are Joomla experts, and we pride ourselves in our availability and friendliness!

One Response to “Common Errors on Joomla’s Media Manager”
  1. Comment by hogo — February 25, 2022 @ 2:25 pm


    Recently, I can’t use any file manager in my Joomla 4.1.

    in FFexplorer 1.0.7 the error is–> init root folder error

    in Joomla 4.1 media manager–> a white screen appears

    in JCE pro 2.9.20 file browser the error is –>The server returned an invalid JSON response.

    So, when I want to create new article, I can’t add image and file from my host. (Note: Previous contents of site, which included photos and files, are still well visible)
    I’ve never had such a problem before.

    I guess after update Joomla from 4.0.6 to 4.1, this happened, but not sure! Any recommendation to resolve this problem?

Leave a comment