Update the Spresense Arduino library to the latest version.
a. Open Board Manager

f037c422-4145-4ec9-8131-a10e63866bb0-image.png

b. Update to the latest version
abf1fa55-3dae-4b44-9448-b81a0552c399-image.png

Open the camera example in the Arduino IDE.
4933f309-c4fa-4233-a3ea-bdadc68a50b6-image.png

Change the image size to 5M.
eebdd4ab-fe2a-4416-b8f8-ab71f597dbb1-image.png

Change Memory to 1536KB
834ad3ce-55c2-4edc-9e6a-f94d81d1d068-image.png

Change the JPG_COMPRESS_RATIO to 9.
a. Open Camera.cpp file:

Windows: %userprofile%\AppData\Local\Arduino15\packages\SPRESENSE\hardware\spresense\2.0.1\libraries\Camera\Camera.cpp Linux: ~/.arduino15/packages/SPRESENSE/hardware/spresense/2.0.1/libraries/Camera/Camera.cpp MacOS: ~/Library/Arduino15/packages/SPRESENSE/hardware/spresense/2.0.1/libraries/Camera/Camera.cpp

b. Change the JPG_COMPRESS_RATIO from 7 to 9:
3fc09ea7-f309-416d-8780-98a9f9908b8a-image.png

Upload camera sketch to Spresense.