Skip to content
BasiX Agency

Guide

Why Discord image links expire, and how to fix it on a FiveM server.

Phone galleries full of broken images, report screenshots that open on an error, old log embeds with nothing in them: if your server stores Discord attachment links, they were never meant to last. Here is what changed, how to recognise it, and how to move uploads somewhere permanent.

No card · 3 GB free · Bandwidth never billed

On this page

What changed on Discord’s side

For years a file posted to a Discord channel got a plain address on cdn.discordapp.com that worked anywhere, forever. Many FiveM resources took advantage of it: screenshot-basic examples, phone scripts and admin menus uploaded images to a Discord webhook and kept the attachment URL as if Discord were an image host.

Discord then started signing attachment links. A link now carries query parameters named ex, is and hm: an expiry timestamp, an issue timestamp and a signature. Inside the Discord client, links are refreshed silently, so the image still shows in the channel. Outside Discord — in a phone NUI, a web panel, a database row — the stored link simply stops working once the expiry has passed, and removing the parameters does not bring it back.

How to recognise the problem

Look at a broken image address. If it starts with https://cdn.discordapp.com/attachments/ or https://media.discordapp.net/attachments/ and ends with ?ex=…&is=…&hm=…, it is an expired Discord link. The symptoms on a FiveM server are consistent: photos in the phone gallery load for a day and then turn into placeholders, report screenshots open fine for the staff member who handled it on the day but not a week later, and loading-screen or item images hosted in a Discord channel vanish for every player at the same time.

Nothing is wrong with your resource. It is doing exactly what it was configured to do; the host underneath it changed the rules.

The fix: upload to a host built for it, keep Discord for notifications

The durable fix is to stop using Discord as storage. Upload the file to a media host that gives you a permanent address, then — if you still want the image in a Discord channel — post that address in the message or embed. Discord renders an image from any public URL, so your staff sees the same thing as before, and the link in your database keeps working.

With BasiX the change is usually a configuration line. LB Phone uses its Custom upload method; screenshot-basic and ScreenCapture can post to the upload endpoint directly; scripts written for Fivemanage or Fivemerr only need the host swapped. Every file gets a direct CDN address that does not expire unless you set a retention policy on its folder.

The endpoint most FiveM upload configs need

https://upload.basix.media/api/v3/file
Authorization: Bearer YOUR_BASIX_KEY
multipart field: file

Report screenshots, end to end

A common pattern is a /report command that screenshots the player and posts the image to a staff channel. With the basix resource, the screenshot is uploaded straight from the player’s machine through a one-time presigned URL, and the permanent link is written into your logs next to the report. Your Discord alert rule can then ping staff, and the screenshot still opens months later when the same player is reported again.

Lua — report command with a permanent screenshot

RegisterCommand('report', function(source, args)
    exports.basix:screenshot(source, { folder = 'reports' }, function(err, file)
        exports.basix:warn('Player report', {
            player = GetPlayerIdentifierByType(source, 'license'),
            metadata = { reason = table.concat(args, ' '), screenshot = file and file.url or nil, error = err },
        })
    end)
end)

Questions

Discord attachment links are signed with an expiry (the ex, is and hm parameters). The Discord client refreshes them; anywhere else, a stored link stops working once it expires.

Related

Updated Oct 26, 2026

Your first file online in a few minutes.

Sign up, upload a file, copy the URL.

3 GB free · No card · Bandwidth not billed

Discord image links expire: the fix for FiveM — BasiX