title: How to set image directory for Primefaces GraphicImage
body: <p>I have a graphicImage component but I couldn't see my loading.gif file. I think there is a problem with file path. My image is under "Web Pages/Resources/images/loading.gif".</p>
  
  <p>I am using Netbeans and 
  Here is my page "Web Pages/Pages/customPages/index.xhtml";</p>
  
  <pre><code>&lt;p:blockUI block="myDataTable" trigger="myDataTable"&gt;  
              Loading&lt;br /&gt;  
              &lt;p:graphicImage library="images" value="loading.gif"/&gt;  
          &lt;/p:blockUI
  </code></pre>
  
  <p><strong>EDIT:</strong> These are also didn't work :)</p>
  
  <pre><code>library="images" value="loading.gif"
  library="resources/images" value="loading.gif"
  value="loading.gif"
  library="resources" value="loading.gif"
  </code></pre>
  
  <p><strong>EDIT2:</strong> Here is how I solved this issue but I don't think it is a good solution. Is there any other way?</p>
  
  <pre><code>value="#{FacesContext.getCurrentInstance().getExternalContext()}/resources/images/loading.gif"
  </code></pre>