google-cloud-storage 上的图像尺寸元数据。

Image dimensions metadata on google-cloud-storage.

我需要知道我正在保存的图像的尺寸,以便我可以将它们添加到 og:image:widthog:image:height 元标记中,以便通过 Facebook、Twitter 等进行图像预览 - as is suggested by this Facebook documentation.

如果我将这些图像保存到 google 存储桶 - 是否有任何现有的方法可以使用现有的标准元数据查找这些图像大小,或者我是否需要添加一些自定义元数据 as described in this google documentation

鉴于 Cloud Storage 将所有内容视为 objects, it does not have multiple object definitions, depending on the type of the object (like media, text... it does something like this via Content-Type but it's not what you're looking for)。从这个意义上说,没有对象类型特征元数据(即图像的宽度和高度或声音或视频的长度)。

唯一预定义的(或者你如何称呼它,标准)元数据条目是提到的那些here and, yes, as you specified, you need to add custom metadata