Use case or problem
Since v1.9.5, Obsidian now supports downloading attachments from URLs in YAML properties, not just markdown links. But the problem is that it fails to detect certain kinds of URLs.
For example, Obsidian will happily download the following embedded image:

But when the same link is put inside a property:
---
cover: https://example.com/image.jpg?a=b
---
Obsidian will no longer download the URL. Removing the parameter from the URL will fix the problem:
---
cover: https://example.com/image.jpg
---
But this trick will not work for most URLs out there.
Proposed solution
The behavior above led me to believe that Obsidian is inferring the content type of the URL by using simple string-matching rules (e.g. check if the URL string ends with .jpg).
I think a more robust method would be to perform a HEAD request to the URL and check the returned Content-Type header. This method is also cheap, as it will only return the headers and not the entire body.
Current workaround (optional)
Remove the parameter from the URL, but this usually will not work for most URLs out there.