Are these pictures files in Finder folders? (That is, they're not in the Photos app?) The very best way is to import these pictures into Photos, and synchronize the Photos Library with Photos at iCloud.com. If that's not what you're doing, what do you need?
Another way would be to turn on iCloud Drive, and drag those picture folders to the iCloud Drive folder. Then they would be on the external drive, in your iCloud Drive folder on the Mac, and in the iCloud Drive folder at iCloud.com.
It's unclear what your goal is. iCloud is a synchronization service that makes the iCloud Drive folder and/or the Photos Library the same on all your devices. Keep in mind that iCloud is not a robust backup.
What, really, are you after?