Storing files in iCloud uses the storage space in your iCloud storage plan. When storage space is needed, only the messages and attachments you recently opened are kept on your Mac.
Store all messages and attachments in iCloud.
To download the original photo or video, just open it. When storage space is needed, only space-saving (optimized) versions of photos are kept on your Mac. Files stored only in iCloud show a download icon, which you can double-click to download the original file. When storage space is needed, only the files you recently opened are kept on your Mac, so that you can easily work offline. Store all files from these two locations in iCloud Drive. Click the Store in iCloud button, then choose from these options: