private synchronized void loadLocalImage( ImageView imageView, String filePath, int width, int height) { if (MediaUtils.isValidImage(filePath)) { imageView.setTag(filePath); Bitmap bitmap = WordPress.getBitmapCache().get(filePath); if (bitmap != null) { imageView.setImageBitmap(bitmap); } else { BitmapWorkerTask task = new BitmapWorkerTask( imageView, width, height, new BitmapWorkerCallback() { @Override public void onBitmapReady(String path, ImageView imageView, Bitmap bitmap) { imageView.setImageBitmap(bitmap); WordPress.getBitmapCache().put(path, bitmap); } }); task.execute(filePath); } } }