Now you are comparing
to
.
NextCloud example response is a real image, with the appropriate Mime type and everything.
Your example is an HTML document! This HTML document has a dedicated engine for oneboxing at onebox/lib/onebox/engine/google_photos_onebox.rb at main · discourse/onebox · GitHub.