Cache file urls in QML Image Gallery example.

Caching urls significantly speedup the example. Moreover we reuse
local url to an uploaded image to avoid network request.