Image size limits Ankihub

I upload long images to a deck from a full webpage, and sometimes if they are very long e.g. > 20 000 pixels high, they wont render in Ankihub. Splitting them up seems to fix the issue. Have checked it’s not due to the issue addressed here: Media not uploading for collaborative deck

Have tried different file formats and compression without success.

Just wondering if there is a limit to the size of image that can be uploaded and if there is a workaround?

I’ll help you with your question about image size limits in AnkiHub. Let me search for some relevant information first.

Search

Found 5 results for 'tags:official image size limit ankihub status:public'

I need to search for more specific information about image size limits in AnkiHub.

Search

Found 5 results for 'tags:official media limit ankihub status:public'

Read topic

Reading: Media not uploading for collaborative deck

Search

Found 4 results for 'tags:official image size dimensions ankihub status:public'

Based on my search of the forum, I couldn’t find specific documentation about image size limits in AnkiHub. However, I can provide some helpful information based on your situation.

Image Size Limits in AnkiHub

While there isn’t explicit documentation about maximum image dimensions, your experience with very long images (>20,000 pixels high) not rendering correctly suggests there is indeed some limitation.

This is likely related to how Anki and AnkiHub handle media files. The issue you’re experiencing is different from the one in the thread you linked, which was about media not uploading due to syncing timing issues.

Workarounds

You’ve already discovered the most effective workaround:

  • Split very long images into smaller segments - This seems to work well based on your experience

Other possible approaches:

  • Resize the images - Reduce the overall dimensions while maintaining readability
  • Compress the images - Use image optimization tools to reduce file size while preserving quality
  • Convert to a different format - Some formats may handle large dimensions better

Why This Happens

The limitation is likely related to:

  1. Browser rendering limitations - Most browsers have maximum canvas sizes
  2. Memory constraints in the Anki application
  3. AnkiHub’s specific implementation for handling media files

Recommendation

Since splitting the images has worked for you, I’d recommend continuing with that approach. As a general guideline, keeping images under 10,000 pixels in any dimension is usually safer for web-based applications.

If you need more specific information about the exact limits, you might want to reach out to the AnkiHub development team directly, as this appears to be a technical limitation that isn’t well-documented in the forum.

Can you link to a note with such images?

Yep, so here is one where the image hasn’t worked:
Link

And this is the same image split into two images:
Link

Images are supposed to be resized to 1080x1080 and converted to the .webp format. In your case though, it appears the image is not uploaded at all for some reason.

Any ideas why or if there’s a workaround?

I can try uploading the image manually to the deck if you share it here.

Wont upload here, but here is a link: https://www.dropbox.com/scl/fi/gy7l2btm25gti417r38vt/1635434b32327f0044275c7988fc09c5.webp?rlkey=0366gx5k8r584mhshfy5lfmr0&dl=0

The image is working now for some reason (I’ve not made any changes yet). Did you change something?

I apologise. I bulk edited a number of cards. I have reverted it now.

I couldn’t upload the file manually due to permission issues, unfortunately. Did it start working after you made an unrelated edit, then stopped after you reverted it?

Unfortunately no, I chopped it up into smaller images so that it worked but forgot that I had linked it here for this discussion.

OK, I tried uploading your image to a private deck and was able to reproduce the issue. Looking into it.

AnkiHub is failing to process the image because it has a dimension exceeding the maximum WebP pixel limit (16,383).

We’ll improve error reporting for such cases in the future.

Ok that makes sense, thank you. Presumably cutting up the images into smaller bites is the only real option in this case?

Yes, that’s the only option for now as AnkiHub converts all images to WebP for optimization.

1 Like