Create own FileNameGenerator
which will generate file names with extension in the end and then set it into disc cache:
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(context)
...
.discCache(new UnlimitedDiscCache(cacheDir, myGenerator))
...
.build();