Modified how to set image limits