Hi
I would like to know if it is possible to use the images of a resource in another resource.
I my case I use esx_inventoryhud where every item has an image that is located under ‘html/img/items/*.png’. I want to reused these same images in another resource.
I dont really want to copy the whole images folder to my new resource, because then I would have to keep the item images up to date in two places.
So far I have tried 3 ideas. These have all failed.
- using relative paths
in my fxmanifest under files I added: ‘…/…/[esx]/esx_inventoryhud/html/img/items/’*.png’
which is the correct relative path in my case (it works when clicking on it in vs code)
when trying to access the files in multiple ways in my html it didnt work
- using @
I noticed that many resource include other scripts with something like this: ‘@es_extended/locale.lua’
So I tried the same with the image folder: ‘@esx_inventoryhud/html/img/items/*.png’
But this also didnt work when trying to access the files in multiple ways in my html
- using Windows shortcuts
I tried creating a windows shortcut to the image directory of esx_inventoryhud
Then I moved the shortcut to my resource, renamed it, and added it to fxmanifest like so: ‘html/itemImages/*.png’
This also didnt work when trying to access the iamges in html
When I simply copy the images folder to my resource and add the folder to fxmanifest like: ‘html/itemImages/*.png’ everything works as expected
I can access the images in html like this: ‘’
Do you guy have any idea what else I could try to get this to work?
Best regards