Inventorybeginner5 min readupdated 25 Oct 2026

The weapon works, but the inventory shows an empty square

The short answer

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.

The weapon works, but the inventory shows an empty square — illustrated with a FiveM-compatible minimap render

#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.

  1. Hover the slot. If a label appears, the item exists and this is an image problem.
  2. If nothing appears, open your inventory's item table and search for the weapon name.
  3. 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.

the path it looks for
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.

Share this guideXRedditFacebook

Questions

Why does it work locally but not on my live server?
Almost always case sensitivity. Windows does not care whether the file is weapon_mygun.png or Weapon_MyGun.png; Linux does, and most hosts run Linux.
Do I need to restart the whole server?
No, but you do need to restart the inventory resource. It reads the images folder when it starts, so a new file added afterwards is invisible until it does.
What size should the image be?
512x512 PNG with transparency. Smaller works but looks soft on large grids; larger is wasted because every inventory scales it down.

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.