public void loadImage(final String imageUrl, final Action1<HtmlImage.ImageData> action, final Runnable actionOnCacheMiss) {
        synchronized (imageCacheMutex) {
            if (imageCache.containsKey(imageUrl)) {
                action.call(imageCache.get(imageUrl));
                return;
            }
            if (actionOnCacheMiss != null) {
                actionOnCacheMiss.run();
            }
            if (imageCacheListeners.containsKey(imageUrl)) {
                imageCacheListeners.get(imageUrl).add(action);
                return;
            }

            imageCacheListeners.put(imageUrl, new ArrayList<>(Collections.singletonList(action)));
            final HtmlImage imgGetter = new HtmlImage(this.htmlImageCode, true, false, false);
            imgGetter.setLoadMetadata(true);

            final Disposable disposable = imgGetter.fetchDrawableWithMetadata(imageUrl).observeOn(AndroidSchedulers.mainThread())
                    .subscribe(imgData -> {
                        synchronized (imageCacheMutex) {
                            imageCache.put(imageUrl, imgData);
                            if (imageCacheListeners.containsKey(imageUrl)) {
                                for (Action1<HtmlImage.ImageData> a : imageCacheListeners.get(imageUrl)) {
                                    a.call(imgData);
                                }
                            }
                            imageCacheListeners.remove(imageUrl);
                        }
                    });
            imageCacheDisposable.add(disposable);
        }
    }
set the code BEFORE starting to use the imageloader
main/src/main/java/cgeo/geocaching/utils/ImageLoader.java