<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>How t0 get Image from resource folder in Module Project ???</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=113082252" />
  <subtitle>How t0 get Image from resource folder in Module Project ???</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=113082252</id>
  <updated>2026-06-12T15:31:53Z</updated>
  <dc:date>2026-06-12T15:31:53Z</dc:date>
  <entry>
    <title>RE: How t0 get Image from resource folder in Module Project ???</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113089630" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113089630</id>
    <updated>2019-04-09T12:51:25Z</updated>
    <published>2019-04-09T12:51:25Z</published>
    <summary type="html">Instead of doing the &amp;#39;new File() thing, you just load the stream and use it:&lt;br /&gt;&lt;br /&gt;InputStream is = classLoader.getResourceAsStream(&amp;#34;/META-INF/resources/IMG/child2.jpeg&amp;#34;);&lt;br /&gt;&lt;br /&gt;But getting your own image kind of means the code is doing way more than it needs to (or is a sign that you&amp;#39;re doing things wrong in general). Using an &amp;lt;img /&amp;gt; tag back to your own context would serve up the image w/o going through the stream handler.</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2019-04-09T12:51:25Z</dc:date>
  </entry>
  <entry>
    <title>How t0 get Image from resource folder in Module Project ???</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113082251" />
    <author>
      <name>Fazalmahammad Babaria</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113082251</id>
    <updated>2019-04-09T05:17:34Z</updated>
    <published>2019-04-09T05:17:34Z</published>
    <summary type="html">hello,&lt;br /&gt;           I am trying to get image from resource folder but its not getting with same path i am able to fetch image but in render method i can&amp;#39;t ,  so anybody have idea that how we can get image from resource folder of module project in our render method. and the code is as below for getting image &lt;br /&gt;&lt;br /&gt;&amp;#34; ClassLoader classLoader = getClass().getClassLoader();&lt;br /&gt; File file = new File(&amp;#34;IMG/child2.jpeg&amp;#34;); &amp;#34;&lt;br /&gt;&lt;br /&gt;thanx in advance</summary>
    <dc:creator>Fazalmahammad Babaria</dc:creator>
    <dc:date>2019-04-09T05:17:34Z</dc:date>
  </entry>
</feed>
