+ Start a Discussion
Shubham MirketaShubham Mirketa 

static resource not found in managed package

Hey,
I have an image in static resource which is getting used in the css property of a div on a vf page. In my developer org, it is working fine. But when i make the managed package and install it in some other org, 404 Not Found error is thrown. The static resource is not getting found. I have checked in the resources and the resource has been included in the package and image is present as well. But somehow it does seem to be found in the package.

Thanks
Shubham Jha 
 
VivekShindeVivekShinde
Can you share the source code which has been used to set the image in div?

If you are using the image as background image of a div then you can set the backgroud image by using $Resource global variable for background-image attribute in a CSS class like following:
.backgroundImageDiv{
    background-image: url("{!URLFOR($Resource.StaticResourceName,'images/BackgroundImage.png')}");
    width: 841px;
    height: 356px;
}
You need to then apply this class to the required div.