Modify gallery object size and limit number