Google docs add-on to set image size

SetImageSize is a Google Docs Addon that allows you to precisely set the size of an image. You can install it from this page. I had fun creating it and am curious if it will be used…

note: when I first created this Addon Google docs was not able to resize images. This feature has recently been added so maybe you want to try that first.

ImageSizeIcon

how to use (here is a video)

  • activate the add-on. You do this by selecting “Add-ons” on the top menu. Then select “SetImageSize”, then select “show sidebar”. You should now see the sidebar on the right.
  • select an image in your document by clicking on the image. The image should be in bmp, gif, jpg or png format. The text flow of the image has to be set to ‘in-line’.
  • retrieve the size of the selected image with the “Get size” button in the sidebar on the right.
  • change the width & height to your liking. You can set the size in pixels, inches & cm.
  • select “Apply” to set the new size.
  • use the padlock icon to lock and unlock aspect ratio.
  • the 1:1 button retrieves the size of the original image (as stored in the image).
  • you can edit your own preferred shortcuts.

limitation

The add on works with bitmap images (bmp, gif, jpg, png) set to ‘inline’ only (because of Google Docs API limitation). When you select an image in Docs you can indicate how the text flows around the image. The options are ‘In line’, ‘Wrap text’ and ‘Break text’; only ‘In line’ will work.

privacy policy

This add-on will only access the current document. It will not copy any document data anywhere outside of your document. Also no personal data is captured or stored.

terms of use

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

coding experience

The programming took some getting used to. The scripts that manipulate the document object model actually run on the server and you need to use a call-back mechanism from the HTML in the browser (the sidebar) to the server-side script. Once that was clear the rest was pretty easy. I probably spent more time on the UI than on the server code. The reviewer gave quick and excellent feedback to make the add-on better. Pretty nice experience. Sometimes Google makes some breaking changes to the API (e.g. the security model), then it sometimes takes a bit of time for me to realise what is going on and find the time to fix it.

73 comments

  1. how can i custom the size because if i put lets say height, the other one chyanges it by itslef cause its adjusting but i need specific sizes for both heith and with how can i do that?

  2. I am looking for something that allows me to bring in the full quality of a screenshot into a document -for training purposes. When any image gets brought into google docs it is immediately grainy and blurry compared to the original. I need something that allows be to bring it in without the compression or whatever is happening in google docs.

    1. hmm, that is not my experience. My add-on cannot change this in any case, it was created to resize images only.

  3. The link to download this add-on is not working. It’s linked to the common invalid URL error message:
    404. That’s an error.
    The requested URL was not found on this server. That’s all we know.

    Has this add-on been discontinued? If not, would you please let me know the link to download.
    Thanks much!

    1. thx for letting me know; it looks like Google changed all urls. It works again now.

      1. Hello, I am replying to this post because I don’t see a place to start a new thread and I have a question. I tried to install your great add-on into my Google Docs because I recently started writing articles for online publication and the editor asked me to be sure my images are high resolution. As you know, there is no way to determine that in Google Docs. I was so happy to see your add-on. But I’ve tried installing it twice and I can get as far as opening the sidebar. But nothing shows on the sidebar. Any suggestions? Thanks.

  4. Resized images do not stay resized. Well, some do, others don’t, it seems completely random. Either that or it resized all images instead of just the highlighted ones. Been fighting it for hours now…

  5. Hi,

    When I click add-ons I only see the “Help” option. I watched your video but there wasn’t anything in there that would resolve this issue.

    1. not sure what happens. I assume you did the installation, right? Then if you select “Add-ons” in the menu, do you see the submenu “SetImageSize” ?

  6. Hi,

    This looks like a cool and useful plugin. I am looking for help. I’m creating Google slides where the background is locked but the students slide moveable shapes to fill a puzzle. Is there a way to LOCK the shape so that as they drag the shape it doesn’t get bigger or smaller? If not, is there any possibility you would consider letting me hire you to create the Add on? Thank you! Chrisitna

    1. Hello Christina, unfortunately I have never worked with Google slides and I’m not sure whether what you are looking for is possible.

    1. not really, the API only allows for minimal interaction with the image. I don’t think cropping can be done. Thanks for the feedback.

  7. Love this plugin!
    A fabulous upgrade would be to be able to size an image based on a percentage of the original size. I use a ton of images in my instructional documents and it’s super hard to get the images to show up proportionately sized. Being able to say x% of original size would be super cool 🙂

  8. Cool add-on. Does this have the ability to grab and manipulate all images in a document because that would be a game-changer?

      1. please add this update! it would be very useful for automating the primary use case of this add-on’s utility. just my opinion tho!

  9. I have more than one google account open and active on my computer. I installed the add-on for one account, but it will not install for the second account. No error message, just acts as if it is installing then goes back to the install screen. Suggestions?

    1. Google add-ons do not work with more than one account open. This is a Google platform limitation. You can only be logged in once at the same time.

  10. I haven’t tried this yet because I’m sure if it’s what I need yet. Here’s my question: Does this tool allow me to upload images that are currently receiving the error message “Unable to create some images” (possibly due to size? My images are png and range from 3.6 to 7.3 MB… Can this tool help me in this situation?

    Thanks in advance!

  11. Does anyone know how to make this addon stop automatically resizing my own image? Sorry if this sounds confusing.
    I’m trying to size my images 9×6 in for a school project, but whenever I’d imput one number then another (ex: for width I put in 9 inches, and length 6 inches), the darn addon just resizes it to a different size (eg: 6 inches turns into 5.19 inches and 9 inches becomes 10.4 inches). I need help and answers.

    1. can you send me a screenshot of what you see? Also: please make sure you are not logged into google with two accounts at the same time. That confuses Google docs and may be the cause of what you are seeing.

  12. Hi,
    Can you please indicate where the “Get Size” button is? When I click on an image I can only see “In Line, Wrap Text, and Break Text.” Thanks!

  13. Thank you so much for this add-on! I use it with my elementary students who find and print pictures in Google Docs for books they put together and we need the pictures to all be a certain standardized size. This works perfectly!

  14. I downloaded the add on and have the bar opened on the side. I also made sure the pictures were set to “in-line”. I am getting this error message every time I try to get the dimensions of my picture. “ScriptError: Authorization is required to perform that action.” I even tried using an unedited picture to see if my cropping was the problem. I am trying to print small pictures for a few frames so if I could get some help with figuring this out that would be great.

    1. hello, did you check if you are maybe logged into google with two accounts at the same time? This sometimes triggers the behavior that you describe. You can only be logged in with one account at a time. Pls let me know… Wouter

  15. This is a nice feature that is missing from the office Google Docs.
    Thank you for the add-on, and for the fixes due to the google api changes.

  16. I just wanted to say thank you so much for updating your add-on! It’s working again for us. It’s been an invaluable tool, and we really appreciate you creating and maintaining it. Thanks again!!! Wishing you a very happy summer. : )

    1. thanks for the feedback, Google made some changes to the security model and it took a bit of time to figure out what was going on. I’m really glad the add-on is useful for you!

  17. absolutely love this add-on! Has been a real time saver, but as pf this morning, I am no longer able to use it. Receiving error message: You do not have permission to call showSidebar.

    Please help.

  18. Thankyou so much, this has been one of the most annoying (missing) feature in google docs. You are an absolute legend!

  19. Hello Wouter,
    Every time I activate this add-on I get notified several weeks later by Google that there is a “security issue found on your account”. Google says that this add-on has too much of my private data and recommends I disable it, which I have done 3 times now. Out of the 14 add-ons I have installed right now, this is the only one producing this warning messages. Please make the necessary changes to prevent this from happening. Even if this function is very useful, I don’t want to give it access to sensitive documents. Thank you!

    1. thank you for the feedback. I am asking only for minimal access rights, only to the current document so I’m a bit stumped by that Google message. I have sent you an email to see if we can figure out what is going on…

  20. Hi! Nice idea! But I’m trying to install it to no avail! I’m able to select it but installation’s window claims that it is not able to find the site from where download the plugin. Please, any idea? Thanks!

  21. This is awesome. One thing that would be really helpful is being able to select all images or a set of images in a doc and doing a mass resize. Essentially having the ability to resize more than one image at a time.

  22. Thank you so much! I needed to resize some graphs for a bio paper and they all had to be the same size, which I couldn’t have done on google doc with out this add-on. Thank you!!!

  23. Thank you for writing this plugin! It’s a big help for images with fine text. If the image isn’t at exactly the right size, the text becomes blurry. I’d love to just have a single button for “set to original size”.

Leave a Reply

Your email address will not be published.