I am displaying results with an image (icon) next to it. I have noticed that for each image displayed, it is making an new request to fetch the image from a unique path. If I have 100 results, that is 100 fetches for the (same) image.
Is there a better aproach so the image path is always the same?
Here is my code:
FileResource resource =
new FileResource(new File(
basepath
+ "/WEB-INF/img/recordtypes/"
+ (recordType == null ? "webcontent" : recordType.toLowerCase())
+ ".png"));
image = new Image(null, resource);
Produces:
Requests: