###Edit 2:
Para você poder fazer o download de imagens em qualquer formato:
@RequestMapping("imagens")
public ModelAndView imagens() throws IOException {
ModelAndView mv = new ModelAndView("image-list");
Set<String> nomeDasImagens = servletContext.getResourcePaths("/resources/imagens/").stream()
.map(FilenameUtils::getName)
.collect(Collectors.toSet());
mv.addObject("imagens", nomeDasImagens);
return mv;
}
@RequestMapping(value = "download/{nome:.+}", method = RequestMethod.GET)
@ResponseBody
public ResponseEntity<InputStreamResource> downloadImage(@PathVariable String nome) throws FileNotFoundException {
InputStream is = servletContext.getResourceAsStream("/resources/imagens/" + nome);
if(is == null) {
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(null);
}
return ResponseEntity.ok()
.contentType(MediaType.parseMediaType("image/" + FilenameUtils.getExtension(nome)))
.header("Content-disposition", "attachment; filename=" + nome)
.body(new InputStreamResource(is));
}