Added configurable image size limit