Adding image dimension flexibility