fix bug in image picker for max size