Site logo

Archived topic

Add Google Drive Images with GenerateBlocks

5 replies · Started by Baventhiran on July 21, 2021

Viewing posts 1–6 of 6

Hi,

Can I know how to add images from Google (Shared) Drive using the GenerateBlocks feature?

I've tried using this URL but it first returned the alt as empty, after adding a word it returned the below:
Incomplete Image

The image will only show when changing the open to thumbnail. Is there a way to add the URL without changing one by one before adding?

Hi there,

I don't think that URL will work, assuming you're using it as src="" path for <img> element, because that's pointing to a page instead of image file.

You'll need a plugin for this. Something that will pull the actual image files from Google Drive directories. Perhaps something like this - https://wordpress.org/plugins/skaut-google-drive-gallery/

Hi Elvin,

Thank you, but that plugin is not how I want image to be displayed. Also like I stated, in the URL, changing open to thumbnail works, so URL can work.

For example,

<figure class="wp-block-image size-large">x</figure>

shows this:
No-image-shown

<figure class="wp-block-image size-large">x</figure>

shows this:
Image-shown

So as you can see, URL can work.

Yes, I know, I asked in the first post if it can be done without editing.

Since it seems that it cannot, I'll use this post to mark the topic as resolved. Thanks anyway, Elvin.

Yes, I know, I asked in the first post if it can be done without editing.

Yeah, sorry about that. I was about to suggest making a custom HTML for the image but that's basically the same as editing HTML of the image block.

Editing the HTML is the way to go, unfortunately.

This archived topic is closed to new replies.