image gallery scales correctly