I was able to load and cache the image file using ImgCache.cacheFile() from imgcache.js. However, when I switch to using the img-cache directive like <img img-cache ic-src="{{ img_url }}">, I always got the XHR error like the following.
40 705389 log ERROR: Download error source: http://127.0.0.1:8000/media/post/4137461961516911608/4137461961535552563_thumbnail.jpg
41 705390 log ERROR: Download error target: /imgcache/ae85743729d59d33e5f2c8b5ec7d1047a906144e.jpg
42 705391 log ERROR: Download error code: 0