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

0 Members and 1 Guest are viewing this topic.

Offline richtea

  • Administrator
  • Hero Member
  • *****
  • Posts: 4399
  • Karma: +47/-3
    • View Profile
  • My K bike model:: K1300S
  • 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: 2811
  • 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

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: 2028
  • Karma: +23/-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 owner
  • Modifications and add-ons:: Upgrade to Kawasaki H2 SX SE! Almost 220bhp at the wheel! BST Carbon wheels and Sargent seat
  • 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

  • Full Member
  • ***
  • Posts: 138
  • Karma: +1/-0
    • View Profile
  • My K bike model:: 2010 K1300GT EE
  • Modifications and add-ons:: Touratech heated seats
  • 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=-