Make the imageinfo fetch more generic

Also use it in the resize method

Change-Id: I0ee2fcf7daf4a2492981c8311f3a3fd7054d6ae2
Merge "Make the imageinfo fetch more generic"