The problem is that UploadField creates an Image object, which is then wrapped to CloudImage, but the initial reference is still an Image. This is a weakness in the architecture that I don't know how to overcome at this stage. The following code then fails in UploadField.php (currently line 911 - the call to SetRatioSize returns null because the width and height are not set):
Implement getThumbnail in CloudFileExtension. This would cover the above case but I'm uncomfortable with it b/c it feels hack-y.
Set $this->width and $this->height on the source image object during the wrapping process. This would cause SetRatioSize to at minimum return a CloudImageMissing placeholder. Again, not ideal.
Do the upload offline - either by requiring the QueuedJobs module or an additional cron job. I really don't want to have to do this.
The problem is that UploadField creates an Image object, which is then wrapped to CloudImage, but the initial reference is still an Image. This is a weakness in the architecture that I don't know how to overcome at this stage. The following code then fails in UploadField.php (currently line 911 - the call to SetRatioSize returns null because the width and height are not set):
Options: