Source:
<code>public void loadImage(final String url, final Callbacks callbacks, final int maxWidth, final int minWidth) { final String cacheKey = url + maxWidth; Bitmap cachedBitmap = WordPress.getBitmapCache().get(cacheKey); if (cachedBitmap != null) { cachedBitmap.setDensity(DisplayMetrics.DENSITY_DEFAULT); callbacks.onImageLoaded(new BitmapDrawable(context.getResources(), cachedBitmap)); return; } if (new File(url).exists()) { int orientation = ImageUtils.getImageOrientation(this.context, url); byte[] bytes = ImageUtils.createThumbnailFromUri( context, Uri.parse(url), maxWidth, null, orientation); if (bytes != null) { Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length); if (bitmap != null) { WordPress.getBitmapCache().putBitmap(cacheKey, bitmap); bitmap.setDensity(DisplayMetrics.DENSITY_DEFAULT); BitmapDrawable bitmapDrawable = new BitmapDrawable(context.getResources(), bitmap); callbacks.onImageLoaded(bitmapDrawable); } else { callbacks.onImageFailed(); } } else { callbacks.onImageFailed(); } return; } callbacks.onImageLoading(loadingInProgress); WordPress.sImageLoader.get(url, new ImageLoader.ImageListener() { @Override public void onResponse(ImageLoader.ImageContainer response, boolean isImmediate) { Bitmap bitmap = response.getBitmap(); if (bitmap == null && !isImmediate) { callbacks.onImageFailed(); } else if (bitmap != null) { final String cacheKey = url + maxWidth; bitmap = ImageUtils.getScaledBitmapAtLongestSide(bitmap, maxWidth); <START> if (bitmap != null) { <END> WordPress.getBitmapCache().putBitmap(cacheKey, bitmap); bitmap.setDensity(DisplayMetrics.DENSITY_DEFAULT); BitmapDrawable bitmapDrawable = new BitmapDrawable(context.getResources(), bitmap); callbacks.onImageLoaded(bitmapDrawable); } else { callbacks.onImageFailed(); } } } @Override public void onErrorResponse(VolleyError error) { callbacks.onImageFailed(); } }, maxWidth, 0); }</code><technical_language>this is true. verified getScaledBitmapAtLongestSide returns original bitmap (that is null) if resize is possible</technical_language>

Target:
public void loadImage(final String url, final Callbacks callbacks, final int maxWidth, final int minWidth) { final String cacheKey = url + maxWidth; Bitmap cachedBitmap = WordPress.getBitmapCache().get(cacheKey); if (cachedBitmap != null) { cachedBitmap.setDensity(DisplayMetrics.DENSITY_DEFAULT); callbacks.onImageLoaded(new BitmapDrawable(context.getResources(), cachedBitmap)); return; } if (new File(url).exists()) { int orientation = ImageUtils.getImageOrientation(this.context, url); byte[] bytes = ImageUtils.createThumbnailFromUri( context, Uri.parse(url), maxWidth, null, orientation); if (bytes != null) { Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length); if (bitmap != null) { WordPress.getBitmapCache().putBitmap(cacheKey, bitmap); bitmap.setDensity(DisplayMetrics.DENSITY_DEFAULT); } BitmapDrawable bitmapDrawable = new BitmapDrawable(context.getResources(), bitmap); callbacks.onImageLoaded(bitmapDrawable); } else { callbacks.onImageFailed(); } return; } callbacks.onImageLoading(loadingInProgress); WordPress.sImageLoader.get(url, new ImageLoader.ImageListener() { @Override public void onResponse(ImageLoader.ImageContainer response, boolean isImmediate) { Bitmap bitmap = response.getBitmap(); if (bitmap == null && !isImmediate) { callbacks.onImageFailed(); } else if (bitmap != null) { final String cacheKey = url + maxWidth; bitmap = ImageUtils.getScaledBitmapAtLongestSide(bitmap, maxWidth); WordPress.getBitmapCache().putBitmap(cacheKey, bitmap); bitmap.setDensity(DisplayMetrics.DENSITY_DEFAULT); BitmapDrawable bitmapDrawable = new BitmapDrawable(context.getResources(), bitmap); callbacks.onImageLoaded(bitmapDrawable); } } @Override public void onErrorResponse(VolleyError error) { callbacks.onImageFailed(); } }, maxWidth, 0); }