Assigned
Status Update
Comments
jp...@google.com <jp...@google.com> #2
Generated Metadata
- Summary: The Docs API does not provide sufficient information to export cropped images to HTML without downloading the image and retrieving its original dimensions. Requesting the inclusion of the resized image's dimensions in the
document.get
API response. - Tags:
Additional resources:
https://developers.google.com/workspace/docs/api/reference/.../documents https://developers.google.com/workspace/docs/api/how-tos/images
You can
bl...@google.com <bl...@google.com> #3
Automated by Blunderbuss job workspace-devrel-public-issue-tracker-blunderbuss-autoassigner for config assign for component 555502.
Description
Description
We don't get enough information from
document.get
API to export cropped images into HTML. If we still want to do it, we need to download the image from the URL and retrieve its original dimensions to calculate the required details, which is not ideal.Details
document.get
API.size
: Height and width of the image after it's cropped. The image could have been resized before it was cropped.cropProperties
: Relative offsets for cropping image w.r.t. image's original dimensions.Ex.
img
insidespan
withoverflow: hidden;
. The outerspan
is responsible for showing the cropped portion of the image, and the innerimg
is responsible for rendering the image in resized dimensions and margins set such that the cropped portion is visible through the outerspan
.Ex.
Issue
img
). If I still want to calculate it, I first need to download the image from the URL, retrieve its original dimensions, and then derive resized dimensions with the help ofsize
andcropProperties
provided in the API.Is there any better way to export cropped images to HTML? If not, can we include the resized image's dimension in the
document.get
API?