Support for image resizing

This reverts commit 10a271a82adbf3462d37c6e82939102fc2d4daa1.

Change-Id: Id95de48c956dcb9ad6dd62f81bee6ce68d793cb0
Merge "Support for image resizing"