Skip to content

Supabase Storage errorSupabase Storage: upload rejected for its MIME type

InvalidMimeType is a Supabase Storage error about an upload’s MIME type. It is commonly seen when a bucket’s allowed list rejects the file’s type, such as an iPhone HEIC photo in a bucket that allows only JPEG and PNG.

Short answer

Check the bucket’s allowed MIME types in the dashboard and the content type your upload sends. Add the missing type to the bucket, convert the file before upload, or pass the right contentType. Prefer an explicit list, such as image/jpeg, image/png, image/webp and image/heic, over image/*.

Rather not fix it yourself? App Fix Ticket starts with a fixed-price diagnosis, then a fixed price for the fix before any fix work.

Why the file type is rejected, and the fix

  1. 01

    The bucket doesn’t allow that type

    A bucket created with allowedMimeTypes rejects types outside the list. iPhones save HEIC photos, and many tools export WebP, so a JPEG and PNG list misses them. Edit the list in the dashboard under the bucket’s settings.

  2. 02

    The upload sends the wrong content type

    “By default, Storage will assume the content type of an asset from the file extension.” Supabase docs, Standard uploads (Content type)

    Without a file extension, Storage can’t infer the type. Pass the real type with the upload, and stop if the browser reports none.

    if (!file.type) throw new Error('Unknown file type');
    await supabase.storage.from('avatars').upload(path, file, {
      contentType: file.type,
    });
  3. 03

    The contentType value is malformed

    “The specified MIME type is not valid.” Supabase docs, Storage error codes (InvalidMimeType)

    A value like jpg or image instead of image/jpeg isn’t a MIME type. Send the full type and subtype.

  4. 04

    The rule is right and the file is wrong

    If the bucket should only take images, keep the rule. Check the type in the browser before upload and show the user which formats work.

Checked against the vendor’s docs on : Supabase docs: Storage error codes; Supabase docs: Creating buckets; Supabase docs: Standard uploads.

Rather hand it over?

Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.

“Very responsive, attentive to fixing bugs, and completed the project as needed! Thank you!”
A buyer in the United States, July 2022. Shopify on Fiverr
All 127 Fiverr reviews

Related: Supabase Storage InvalidKey · Supabase Storage EntityTooLarge · Supabase Storage bucket is public · Supabase invalid input syntax for type uuid

Questions

More on this error

Should I remove the MIME type limit?

Usually not. The limit stops users uploading files your app can’t handle. Widen it to the types you support, listed one by one. image/* also allows SVG, which can carry scripts.

Can browsers show HEIC images?

Many browsers can’t. Convert HEIC to JPEG before upload, or allow it and convert on the server.

Can you fix it for me?

If one bug is the whole problem, the App Fix Ticket covers it: a written diagnosis first, then the fix. If the app has more going on, the Launch Check is a written check of the whole app. Each issue found is rated critical, high, medium or low, with where it is and how it was confirmed. No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.

A different error?

Describe it and get a written quote

Send the error and what you were doing. You get a written scope, a fixed price and a timeline; Simon replies by email, usually within one business day.