Author Topic: Displaying Google Drive images directly in a message  (Read 4039 times)

0 Members and 1 Guest are viewing this topic.

Offline richtea

  • Administrator
  • Hero Member
  • *****
  • Posts: 4664
  • Karma: +49/-3
    • View Profile
  • My K bike model:: K1300S, K1600GT winter hack :-)
  • Location:: Banburyshire
Displaying Google Drive images directly in a message
« on: June 23, 2019, 12:31:46 am »
** Note: Look up how to do the basic Google Drive steps below on Google or Bing, if you're new to it. You'll find far better explanations than I can manage here. **

Basic Google Drive steps:
- a Google Drive account with an image/photo already uploaded, that you want to share
- Make the Google Drive image shareable with anyone
- Get the image's sharable link (aka URL)


Example:
Here's my test shareable link (you can click on it if you want to see the image - oh go on):
https://drive.google.com/file/d/1aE8S0SPTusdtpcQuTQFYjfl4JYtFPISH/view?usp=sharing


The sneaky stuff:
1. Extract your image's unique ID from inside that link / URL:
https://drive.google.com/file/d/1aE8S0SPTusdtpcQuTQFYjfl4JYtFPISH/view?usp=sharing

The unique image ID (for my particular image) is 1aE8S0SPTusdtpcQuTQFYjfl4JYtFPISH

2. The magic bit: Add your image ID into a special 'direct' URL. The basic 'direct' URL is:
https://drive.google.com/uc?id=

Adding your unique image ID gives:
https://drive.google.com/uc?id=1aE8S0SPTusdtpcQuTQFYjfl4JYtFPISH

3. Finally wrap it with [img][/img], like so:
[img]https://drive.google.com/uc?id=1aE8S0SPTusdtpcQuTQFYjfl4JYtFPISH[/img]

Pressing the 'Insert Image' button in the message composition screen will add [img][/img] for you if you prefer, but you'll still have to accurately paste the final URL in-between the [img][/img].

4. Paste the URL into your post, and hit Preview - if you see the image, you've got it right!

5. Post, post, baby




[Jan 2024] NOTE! If you're not seeing an image of a fat bloke above, then follow the fix in this post:
https://eurokclub.bike/index.php?topic=5315

Or consider using imgbb instead.
« Last Edit: January 24, 2024, 09:47:14 am by richtea »

Offline Matt

  • Administrator
  • Hero Member
  • *****
  • Posts: 2996
  • Karma: +20/-2
    • View Profile
  • My K bike model:: KTM 1290 Super Duke GT
  • Modifications and add-ons:: Oberon slave cylinder, 3D printed nav mount
  • Location:: Berkshire
Re: Displaying Google Drive images directly in a message
« Reply #1 on: June 23, 2019, 08:02:32 am »
Great!

My one thought: perhaps add a warning/reminder note on re-sizing images prior to this. Not that I remember how to do that outside of imgur :P
"Why was the spider disappointed after browsing the web? Because he couldn't find any fly downloads!"
Claude.ai effort at an original joke - 2022
"Why don't mountains ever get lost? Because they always peak at the right moment!"
chatGPT 4o effort at an original joke - 2024

Offline PeterZ

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
  • My K bike model:: K1200R
  • Location:: Yerseke, the Netherlands
Re: Displaying Google Drive images directly in a message
« Reply #2 on: June 23, 2019, 08:48:53 am »
test

« Last Edit: June 23, 2019, 09:23:11 am by PeterZ »

Offline black-k1

  • Hero Member
  • *****
  • Posts: 2166
  • Karma: +24/-2
  • An Original Old Git.
    • View Profile
    • The Old Gits
  • My K bike model:: ex K1200S, K1300S Sport & K1300S Motorsport owner. Now a Kawasaki H2 SX SE and BMW R1250RT owner
  • Modifications and add-ons:: Upgrade to Kawasaki H2 SX SE with BST Carbon wheels. Also a BMW R1250RT LE for long distance pillion work.
  • Location:: Bury St. Edmunds, Suffolk, UK
Re: Displaying Google Drive images directly in a message
« Reply #3 on: June 23, 2019, 08:58:47 am »
Great!

My one thought: perhaps add a warning/reminder note on re-sizing images prior to this. Not that I remember how to do that outside of imgur :P
A very good point but (thanks to Rich) we now know the forum can do its own resizing for display purposes. Simply replace the [img] at the start of the image display line with [img width=800]. Simples!
Correct rear brake use is scientifically proven to shorten stopping distances in EVERY road situation.

European Motorcycle Tours since 1998
The Old Gits - www.old-gits.org

Offline GlynH

  • Sr. Member
  • ****
  • Posts: 256
  • Karma: +1/-0
    • View Profile
  • My K bike model:: 2010 K1300GT EE
  • Modifications and add-ons:: Touratech Heated Seats ezCAN II Accessory Manager Denali Soundbomb Compact Illuminated Side Emblems Antigravity Battery Tracker+ Chigee AIO-5 Play
  • Location:: Oxfordshire
Re: Displaying Google Drive images directly in a message
« Reply #4 on: June 28, 2023, 02:56:42 pm »
And just for completion if anybody comes across the same problem as me where your own photos are still not displaying after following the excellent instructions above please double check the format your photos are saved as in Google Drive.

As an iPhone user my camera format was set to save in High Efficiency (.HEIC) and it appears this SMF Forum software cannot display images in this format.

If you set your iPhone camera to save in Most Compatible (.JPG) everything works as expected after following the excellent instructions above.

I know I've repeated myself on this same subject today in other threads but just wanted to follow up here in case anybody searches in future and stumbles across this thread.

Hope that helps.

-=Glyn=-

Offline GlynH

  • Sr. Member
  • ****
  • Posts: 256
  • Karma: +1/-0
    • View Profile
  • My K bike model:: 2010 K1300GT EE
  • Modifications and add-ons:: Touratech Heated Seats ezCAN II Accessory Manager Denali Soundbomb Compact Illuminated Side Emblems Antigravity Battery Tracker+ Chigee AIO-5 Play
  • Location:: Oxfordshire
Re: Displaying Google Drive images directly in a message
« Reply #5 on: July 09, 2024, 11:43:23 am »
Interestingly Rich your post explaining how to use Google Drive to post photos including an example photo is not displaying these days!

I'm gonna have another go to see if I can display a photo from Google Drive so please just ignore this post.

Here we go. Or not as I suspect the case to be.

First of all a straight copy of the photo link inserted using the Insert Image icon above which will probably fail miserably;



Now using the Insert Hyperlink icon above which I expect will allow the link to be clicked on to display the photo;

https://drive.google.com/file/d/1bMzypmyinvRw-wJSXUvbRrYiNwcmiVDK/view?usp=sharing

Now using Rich's instruction and the way I used to have photos displayed on here before they all just stopped working so guessing this won't work either although it will probably display the box outline with a small question mark in the middle like the two examples above;



Not sure what else to try...why does Google have to break things that used to work properly?

And finally I've just spotted the modified modified link in another post from Rich;



-=Glyn=-
« Last Edit: July 09, 2024, 11:49:29 am by GlynH »

Offline GlynH

  • Sr. Member
  • ****
  • Posts: 256
  • Karma: +1/-0
    • View Profile
  • My K bike model:: 2010 K1300GT EE
  • Modifications and add-ons:: Touratech Heated Seats ezCAN II Accessory Manager Denali Soundbomb Compact Illuminated Side Emblems Antigravity Battery Tracker+ Chigee AIO-5 Play
  • Location:: Oxfordshire
Re: Displaying Google Drive images directly in a message
« Reply #6 on: July 09, 2024, 11:51:29 am »
Well that last way of doing things seems to work!

I wonder how long that will last before Google see fit to break it again?

All good for now though which is a result. When I get bored I might week go back and later all of my links to reflect these changes and see if I can make my photos display again.

-=Glyn=-

Offline raesewell

  • Administrator
  • Hero Member
  • *****
  • Posts: 6229
  • Karma: +56/-5
    • View Profile
  • My K bike model:: Yamaha FJR (2013)
  • Location:: Normanton West Yorkshire
Re: Displaying Google Drive images directly in a message
« Reply #7 on: July 09, 2024, 12:36:23 pm »
imgbb just works and has done for many years.

Offline Matt

  • Administrator
  • Hero Member
  • *****
  • Posts: 2996
  • Karma: +20/-2
    • View Profile
  • My K bike model:: KTM 1290 Super Duke GT
  • Modifications and add-ons:: Oberon slave cylinder, 3D printed nav mount
  • Location:: Berkshire
Re: Displaying Google Drive images directly in a message
« Reply #8 on: July 09, 2024, 02:27:47 pm »
This is all reminding me of that year I insisted on getting to my bedroom every evening via a rope ladder and next door's overhanging tree.
"Why was the spider disappointed after browsing the web? Because he couldn't find any fly downloads!"
Claude.ai effort at an original joke - 2022
"Why don't mountains ever get lost? Because they always peak at the right moment!"
chatGPT 4o effort at an original joke - 2024