code: public static Report restoreImagesName(Report report) {
          JasperContent reportContent = (JasperContent) report.getContent();
          JcrFile masterFile = reportContent.getMaster();
  		try {
  			String masterContent = new String(masterFile.getDataProvider().getBytes(), "UTF-8");
  			if (reportContent.getImageFiles() != null) {
  				for (JcrFile imageFile : reportContent.getImageFiles()) {
  					String oldName = imageFile.getName();
  					int startIndex = oldName.indexOf(ReportUtil.IMAGE_DELIM);
  					int extIndex = oldName.lastIndexOf(ReportUtil.EXTENSION_SEPARATOR);
  					String newName = oldName.substring(0, startIndex) + oldName.substring(extIndex);
  					masterContent = masterContent.replaceAll(oldName, newName);
  					imageFile.setName(newName);
  					if (LOG.isDebugEnabled()) {
  						LOG.debug("Image " + ": " + oldName + " > " + newName);
  						// LOG.debug("master = " + master);
  					}
  				}
  			}
  			masterFile.setDataProvider(new JcrDataProviderImpl(masterContent.getBytes("UTF-8")));
  		} catch (UnsupportedEncodingException e) {
  			LOG.error("Error inside JasperUtil.restoreImagesName: " + e.getMessage(), e);
  			e.printStackTrace();
  		}
  
          return report;
      }
docs: Images are in the master file