if you are using NPbase or ESX you need to create the png images with transparent backgrounds that 100x100 and place them in "-inventory\nui\icons" folder. Edit your shared_list.js in you inventory folder and then add your *.png to the item you added in the *.js
itemList["-1075685676"] = {fullyDegrades: false, decayrate: 2.0, displayname: "9mm Pistol", price: 10, craft: [ {itemid: "copper", amount: 50 }, {itemid: "glass", amount: 80 }, {itemid: "steel", amount: 10 } ], weight: 11, nonStack: true, model: "", image: "np_pistol.png", weapon: true , deg: true} //'Pistol'
For QBcore you need to add the item in your shared.lua in your qb-core (what ever core your using)
["weapon_pistol"] = {["name"] = "weapon_pistol", ["label"] = "Colt 1911", ["weight"] = 11000, ["type"] = "weapon", ["ammotype"] = "AMMO_PISTOL", ["image"] = "pistol.png", ["unique"] = true, ["useable"] = true, ["combinable"] = nil, ["description"] = "Pistol"},
Then the *.png that you created goes in your "-inventory\ui\images" folder.
Image type and size stays the same for all three cores.
Hope this helps you