Guides

Fixing Media, MathJax, and Templates After an Import

A troubleshooting order for missing images, broken MathJax formulas, and broken templates after importing a flashcard deck.

A flashcard with a broken image icon next to the same card showing the image loading correctly after a fix

Missing images, unrendered formulas, and broken templates after an import almost always come from one of three causes: media files that didn't travel with the export, a formula syntax the destination renders differently, or a template rule the destination doesn't apply the same way. Check them in that order, because fixing the wrong layer first wastes time.

Short answer

  • A blank image usually means the media file wasn't in the export, not that the import failed.
  • MathJax problems are almost always a rendering difference, not lost data — the formula text is still there.
  • Broken templates show up on specific note types, not the whole deck, so isolate before you rebuild.
  • Test one card of each type before assuming the whole import has a systemic problem.
  • Fix the export first if media keeps failing; re-importing over a bad export repeats the same failure.

Why media breaks silently during a migration

A card's front and back text can import perfectly while its image or audio fails, because the card and its media are stored separately even inside a single export file. The card references a file by name; the media file itself has to travel in the same package and land in a place the destination actually reads. When either link breaks, the card still imports — it just shows a blank space where the media used to be.

This is why "the import finished without an error" tells you nothing about whether the media came through. An importer that successfully creates a card has no way to know that the image it expected isn't included, unless it explicitly checks and reports the miss. Most don't surface that check prominently, so the burden falls on you to test rather than trust a success message.

Fixing missing images and audio

Start by confirming the media was actually included in what you exported, not just what you imported.

  1. Check the export, not just the import. If you're the one who created the export, redo it with the option to include media checked, if your source application separates that setting from the deck data itself.
  2. Open the specific card that's missing media, not just a list view. A card can look complete in a list and still be missing its image, because list views often don't render the media at all.
  3. Search for the file name the card references, if your source and destination both expose that detail. A media file that exists under a slightly different name than the card expects will silently fail to attach.
  4. Re-export a small test deck containing just the missing card, with media explicitly included, and re-import only that test. If the media appears this time, the original export was incomplete rather than the importer being at fault.
  5. Re-attach the file manually as a last resort for a handful of cards, rather than re-importing an entire large deck to fix a small number of missing files.

Audio follows the same pattern as images: a card can display normally and still be missing its sound, so you have to actually play it to know. Don't rely on an attachment count in a summary screen — open and play the file itself.

Fixing MathJax and formulas that don't render

A formula that shows as raw text — dollar signs, backslashes, curly braces — instead of a rendered equation is a rendering issue, not lost data. The formula's source text almost always imported correctly; what's failing is the destination interpreting that syntax the same way the source did.

  1. Confirm the raw text is there. Open the card and check that the formula's underlying text — the dollar-sign-delimited MathJax or LaTeX — is present, even if it isn't rendering. If the text is there, this is a display problem you can fix without re-importing anything.
  2. Test one formula with each element you actually use: an operator, a fraction, a Greek letter, a superscript. A destination might render simple formulas correctly while failing on a specific structure your collection depends on.
  3. Check for delimiter mismatches. Different tools sometimes expect slightly different markers around a formula. If the raw text is present but wrapped in a delimiter the destination doesn't recognize, that mismatch — not a lost formula — is the actual bug.
  4. Isolate whether it's one note type or all of them. A formula failing on every card points to a destination-wide rendering setting. A formula failing on one note type points to that specific template.

Don't rewrite formulas by hand across a large deck before confirming the underlying text is intact. Fixing a rendering setting once is far less work than manually retyping equations that were never actually lost.

Fixing broken templates and styling

A template controls how a card's fields are arranged and styled — not the content of the fields themselves, which is why a "broken" card often still has all its correct information hiding inside a badly displayed layout.

  1. Inspect a normal card first, then a card you know uses unusual formatting. If both look wrong, the issue is likely destination-wide. If only the unusual one looks wrong, the issue is specific to that template's custom rules.
  2. Check custom CSS or styling separately from card content. A style rule that references a font or class the destination doesn't recognize can distort a card's layout while every field's actual content remains correct and searchable.
  3. Compare field placement, not just appearance. A field that moved into the wrong position on the card is a mapping problem between note types, not a data-loss problem — the text usually still exists somewhere on the card.
  4. Decide what's worth rebuilding. A cosmetic style difference you can live with doesn't need fixing. A layout that hides a field you actually need to see does.

A repeatable six-card test to catch this before it spreads

Run this test on a small sample before assuming your whole import is either fine or broken.

  1. A plain text card with no media or formatting.
  2. A card with an image.
  3. A card with audio.
  4. A cloze card.
  5. A card with a formula.
  6. A card using your most customized template or CSS.

Open each one individually — not from a list view — and confirm the media loads, the formula renders, and the layout matches what you expect. This set of six catches the layers most likely to break separately, so a failure tells you exactly which of the three causes above you're dealing with instead of leaving you guessing across an entire deck.

For the broader pre-migration checklist this test belongs to, see move flashcards without starting over. For what a package export can and can't carry in the first place, see what an .apkg keeps from your schedule.

How StudyDaily handles imported media and templates

StudyDaily keeps imported card formatting intact on import, including cloze formatting and image occlusion display, and reads the media referenced by .apkg and collection package imports. If a specific media file wasn't included in the source export, StudyDaily can't recover a file that was never sent — that limitation belongs to the export, not the importer, which is exactly why testing the export itself is the first troubleshooting step above rather than the last one.

Open StudyDaily in your browser to test an import with your own six-card sample before committing a full collection — reviewing doesn't require an account, so you can check media and formulas before deciding anything else.

What should you do next?

Run the six-card test on a small sample, sort the failure into media, formulas, or templates, and fix that specific layer instead of re-importing the whole collection and hoping the result changes.

  • Open cards individually; list views hide missing media.
  • Confirm formula text is present before assuming it was lost.
  • Isolate whether a layout issue is destination-wide or template-specific.
  • Redo the export with media included before blaming the importer.
  • Keep the six-card sample as your standard test for future imports.

Questions people ask

Why are my images missing after importing a deck?

Almost always because the media file wasn't included in the export, not because the import failed. Re-export with media explicitly included and re-test on the same card before assuming anything else is wrong.

Why doesn't MathJax render after import?

The formula's raw text usually imported correctly; the destination is rendering that syntax differently or using a different delimiter. Check that the underlying text is present before rewriting anything by hand.

How do I know if a template problem affects the whole deck or one note type?

Compare a plain card to a card using your most customized template. If only the customized one looks wrong, the issue is specific to that template's styling rather than the import as a whole.

Should I re-import the whole deck to fix a media problem?

Only after confirming the export itself now includes the missing media. Re-importing without fixing the export first reproduces the same gap, since the importer can't attach a file that was never sent.

Sources used for this guide

This guide describes general packaged-deck export and import mechanics; the official Anki export manual and packaged-deck import manual document how media and formatting travel inside a package for that specific application. StudyDaily's import behavior comes from the product's own importer, checked against these sources for this guide's 6 July 2026 publication date.


Anki is a registered trademark of its respective owner. StudyDaily is not affiliated with, endorsed by, or sponsored by Anki. The product name is used here only to describe compatibility and to compare features.

Try the method with your own cards

Open StudyDaily in your browser. Your local study session needs no account.

Open StudyDaily

Julien builds StudyDaily and checks every guide against primary sources and the released product.

Read the editorial method

All guides