The weapon works, but the inventory shows an empty square
Your weapon fires fine but the inventory slot is blank. The cause is almost always the image name or a missing item entry. Both fixes, step by step.
The weapon streams, it equips, it shoots. The inventory shows a grey box. This is not a broken model — it is the inventory looking for a file that is not where it expects, or an item it was never told about.

#Check the item exists before you blame the image
An empty square with a name under it means the item is registered and the image is missing. An empty square with no name, or an item that cannot be picked up at all, means the item itself was never declared. Those are two different problems and it is worth knowing which one you have before you start moving PNGs around.
- Hover the slot. If a label appears, the item exists and this is an image problem.
- If nothing appears, open your inventory's item table and search for the weapon name.
- If it is not there, add the item entry first — no image will help until it is.
#ox_inventory: the name has to match exactly
ox_inventory looks for an image in web/images named after the item, in lowercase, with a .png extension. WEAPON_MYGUN looks for weapon_mygun.png. Not WEAPON_MYGUN.png, not weapon_mygun.PNG, not weapon-mygun.png. On a Linux server the filesystem is case-sensitive, which is why this works on a Windows test box and fails the moment it is deployed.
resources/[inventory]/ox_inventory/web/images/weapon_myGun.png
^^^^^^^^^^^^^^^
all lowercase#QBCore and qb-inventory
QBCore splits this across two files. The weapon goes in shared/weapons.lua so the game knows it exists; the item goes in shared/items.lua so the inventory can hold it. Both need the same name, and the image goes into qb-inventory's html/images folder — a different place from ox_inventory, which is where most of the confusion comes from when a server has migrated between the two.
- shared/weapons.lua — the weapon definition and its ammo type
- shared/items.lua — the inventory item, with the image field
- qb-inventory/html/images/ — the PNG itself
#The image itself
A JPEG renamed to .png will not render. Neither will a PNG with the background painted black instead of made transparent — it will show, but it will sit in an obvious dark rectangle on a light inventory theme. 512x512 with a real alpha channel is the safe answer, and it scales down cleanly to every grid size in use.
Every weapon exported from this site ships with that image already made, rendered from the weapon's own model rather than screenshotted, and already named for the item so there is nothing to rename.
Questions
Why does it work locally but not on my live server?
Do I need to restart the whole server?
What size should the image be?
Ready to pick a map?
Twelve themes on three base map styles, $8 each, instant download.
Relevant to what you just read
The tool for this
Twenty theme pairs for ox_lib and ox_inventory From $15, built in the browser, exported as a drop-in resource.