I assumed every TikTok link pointed at a video file. That held for months, until a visitor pasted a link and my resolver came back with no video URL at all — just a list of image URLs. The post was a photo slideshow: a carousel of still images with music behind it.

A slideshow is a different shape of content, and a downloader that only understands video files has nothing to hand over. The fix was to teach the resolver to recognise the shape and handle it honestly, instead of failing with a generic error.

Spotting a slideshow

The provider's response for a slideshow looks almost like the response for a video, until you look at the fields. There is no video URL and no list of quality options. Instead there is an array of image URLs, usually JPEG or WebP, each with an order index, and a separate audio track — often M4A — carrying the music.

So the first check in the resolver is now a shape check. If there is a video URL, it goes down the video path. If there is an images array and no video URL, it is a slideshow. If there is neither, that is a real failure, and the page says so plainly.

One detail I got wrong at first: I trusted the provider to return the images in order. It usually does, but not always, so now I sort by the order index the provider sends.

What the visitor actually gets

A slideshow has no single file to hand over, so I stopped pretending there was one. The page says how many images there are, and lists every slide as its own thumbnail with its own download button. The music is listed separately as an audio file, because that is what it is.

I did consider zipping the slides into one download, and decided against it. My downloader never stores files on the server: everything streams through the proxy and is forgotten. Building a zip would mean downloading every slide and holding them in memory or on disk — a new set of ways to fail on shared hosting with a small memory limit.

Each image goes through the same download proxy as the videos. The proxy checks the content type is really an image and reads the first bytes — JPEG files start with FFD8, WebP files carry RIFF and WEBP near the start — before streaming anything. If a slide turns out to be an HTML error page wearing an image name, the visitor gets a clear error for that slide, not a broken file. Filenames come from the cleaned-up post title with the slide number added, and the Content-Disposition header forces a download instead of opening the image.

The edge cases

Slideshows can run to 35 images, so thumbnails sit in a simple grid with small download buttons to keep the page usable on a phone. If one image fails while the rest work — usually an expired URL — the page says so for that slide and leaves the others alone. Failing the whole slideshow because of one slide would be the wrong call.

Some slideshows are mixed, with a video clip among the images; the resolver handles both lists and labels each item for what it is. The music track is sometimes missing entirely, when the provider strips it; then the page simply does not offer an audio download.

I tested this with slideshow links I made myself, counting the slides in the app against the slides in the post. The count has to match: if the app says 12 images and the post has 14, the resolver is dropping slides.

The slideshow handling is live on the TikTok pages of ramrom.io, where a pasted slideshow link now shows every slide instead of an error. A small honest change, but it turned a dead end into a working tool — and it reminded me that the first job of a downloader is to look at what the link actually is, before deciding what to do with it.