• Jiti

    (@jiti)


    Hi,

    we use Google Docs to share and edit our articles among writers. Until now, we used to copy the text and images into Gutenberg, then upload the optimized images before publishing.
    Now, the images are uploaded automatically, but the problem is that Google Docs images are in PNG format. Is anyone else facing this issue? Is it possible to disable automatic uploads, or maybe there’s another solution?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • the problem is that Google Docs images are in PNG format.

    What’s the problem with images being in PNG format?

    And can you provide a sample URL with such an image, so I take a look?

    Thread Starter Jiti

    (@jiti)

    That’s not an optimized format also we can’t name them properly that way.

    First, Google Docs doesn’t have anything to do with this. If you open the photo on your computer, copy and paste it directly into the Gutenberg editor, you’ll see the same effect. (I just tested this, so save yourself the time and just trust me 😀 )

    WordPress is merely saving the image to disk in the same format it received from your device’s memory/clipboard. (Note that the format of the image (saved as a file) is not necessarily the same format the computer saves it to the clipboard/memory (where WordPress is getting the image from when you paste it into Gutenberg).

    In other words, we have:

    JPG file -> Copied to Clipboard (PNG) -> Pasted into Gutenberg (PNG) -> WordPress saves as PNG.

    This is OS dependent though.

    The simplest solution would be to manually upload the image in your preferred file format.

    Otherwise, you’ll have to add custom code in WordPress to convert the image to your preferred format on the fly. This thread has a sample code (I didn’t write it, and I’ve not tested it): https://wordpress.org/support/topic/copy-pasting-images-creates-png-images-not-jpg/

    Good luck!

    Thread Starter Jiti

    (@jiti)

    That’s not it. Something changed in WordPress.

    Cang Long

    (@longvnu)

    I have the same question. I thought WordPress had changed something but my issue is about image upload automatically when I paste text and image from clipboard. Every time I copy text and images from Google Docs to the Block Editor, the images are uploaded automatically and they’re not optimized. I don’t want that.

    Does anyone know how to stop the images uploaded automatically to Block Editor from clipboard?

    I’m using:

    • WordPress ver: 6.7.3 and 6.7.4 (on many sites)
    • PHP ver: 7.4.33 & 7.4.10
Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.