if (configuration != null && configuration.get(Globals.REPOSITORY) != null) {
defaultRepository = site.getRepositoryManager()
.getRepository((String) configuration.get(Globals.REPOSITORY));
}
File file = defaultRepository.pathToFile(
String.format(FILE_FORMAT, params.get(IMAGE_FILE), params.get(TYPE)));
String fileType = PathUtilities.extractType(file.getAbsolutePath());
if (file.exists()) {