Get optimized image info (URL, width and height) on both the server and the client