There is also a support page showing stating that iCloud web photos only support JPEG photos. But you can enable iCloud Photos backup on your iPhone and Mac to upload all HEIF, JPEG, RAW, PNG, GIF, TIFF, HEVC, and MP4.
Convert Images to JPEG and Upload
You can readily convert PNG, HEIC, or any other photo file format to JPEG and then upload the JPEG photo to iCloud Web. This will fix the issue.
Upload Videos to iCloud Drive
You can upload GIFs, Videos, and other media file types can be uploaded to iCloud Drive.