recalculate height as every image loads