Single google photo
-
How can I add a single picture to my blog? I can add albums and multiple pictures. But no single picture from my google photos account.
-
That’s right – you cannot, since Google’s API has nothing to fetch a single photo. Google lets you fetch albums, photos within an album and photos from your account by date/category, but not individual photos.
That being said, why would you require a plugin or API to insert something that you can insert using a regular HTML
imgtag? You could simply right click on the full-sized image on Google, copy the link, and create the image this way on your site:<img src="your-image-link" />This will help save a lot of bandwidth and also avoid the additional load that a plugin adds to your site.
After writing the above I checked the latest API documentation, and it looks like Google has recently started support for a single photo (https://developers.google.com/photos/library/reference/rest/v1/mediaItems/get), but my answer still stands. Basically, there is no way to simply “embed” a photo from Google. So to include a photo via a plugin:
- You have to first install and activate a plugin. Once activated, the plugin adds resources to your site.
- You then have to perform authentication. Authentication happens each time your page is loaded and involves a server call.
- Then you have to create a block / shortcode, the processing of which takes more server resources on your site.
- As a part of the processing, your site will then call Google and fetch the photo. The plugin will then generate the markup for your page.
- Finally the browser will render the markup.
End-to-end the above takes about 1 second, which might not appear like much, but if you
have other plugins it will start making your site look slow.If you use a simple image tag, you will simply require the last step from the above 🙂
A plugin such as Photonic (or anything else) is great when you want to show albums and galleries, but if you only want to show a single image, it is best to go the native HTML route.
Thanks, but it would be nice to have a plugin like Photonic. I use Photonic for albums. Recently I used “Picasa and Google Plus Express” from gjanes. But with the diconnect of picasa and google plus it won´t work anymore.
I can consider a feature request, but it is going to be low on my priority list as I am really not seeing a use case for this.
Why / how would you use this? Given that this is slower for your site, why would this be preferable to doing an
<img>insert?By the way, I am not trying to challenge your wish to use Photonic 🙂
I am only trying to understand if there is some business-case that I am missing here since it takes several hours to develop the code and interface for something like this.
because it´s easier to pick a picture from google by a plugin. But if this is a workaround, I will try it unless a plugin is designed. Photonic is ok for loading more pictures or albums from google. Recently all works great with the old “Picasa and Google Plus Express” plugin, but since google change their support for ald picasa, it won´t work. Thanks for your replies. Greets, Tom
I’d actually much appreciate such feature for multiple reasons:
1. Users (who may not be tech enough) have to switch to html mode.
2. Google links are horrific long! Articles become unreadable immediately.
3. Pictures inserted by Photonic are boxed with Lighbox and a set of styles. Inserting as img requires additional manual actions – high chance of human mistake.
Andwon’t work unless a picture is shared.
If there is a way to support development of specific feature – I’d fund it so you can get a pint or two after great job!
Love Photonic behaviour and features a lot so far.
@serdane9,
Not sure I understood the reasons:1. Users (who may not be tech enough) have to switch to html mode.
Which editor are you referring to here? As far as I am aware nothing requires you to switch to any other mode:
- In the Block Editor you have the standard Image Block, where you can “Insert from URL”, and use the “Link Settings” on the right to link to the original as well.
- In the Classic Editor, Visual Mode you can click on “Add Media”, then “Insert from URL” and specify the URL
- In the Classic Editor, Text Mode you can click on the
imgbutton, then provide the URL, and subsequently use thelinkbutton link this to the same URL.
2. Google links are horrific long! Articles become unreadable immediately.
But wouldn’t you see the same effect if you are using a shortcode in the text editor? The long identifier will show up there too, and the extra attributes of a shortcode make the end result just as long as an
imgtag.And if you are not using a shortcode, the block editor or the visual editor are not going to disrupt your article’s readibility. Rather they are going to show your image exactly as it would appear on the front-end.
3. Pictures inserted by Photonic are boxed with Lighbox and a set of styles. Inserting as img requires additional manual actions – high chance of human mistake.
Photonic has an option that lets you convert any linked image (not just Photonic images) into a lightbox (Photonic → Settings → Generic Options → Generic Settings → Include Photonic JS for non-Photonic Images / Videos) – you don’t need any special markup for this; Photonic automatically takes care of all of that for you.
And won’t work unless a picture is shared.
This is not correct. You are thinking of the page for a photo, but I am talking about right-clicking to get the photo’s actual URL. The URL works without your photo being shared.
If there is a way to support development of specific feature
Trust me, I am not in it for the money, or I would have never been offering Photonic for free 🙂
If I was, the development effort that has gone into Photonic is a few thousand hours, and it would be well past funding in this manner.Again, I welcome feature requests, but this one is impractical because not only is the development effort significant, but it also is tough to use such a feature in the back-end. Consider this: if you have 2000 images, how will you search for the image to insert? Google only returns 100 photos at a time (unlike SmugMug or Flickr or Zenfolio) and it doesn’t support searching by random text, so you will have to keep on loading all the photos before you get to the one you are looking for. This will make the feature a lot harder to use than it appears on the surface.
Thanks a lot for coming back. This is unbelievably helpful and detailed answer.
Deeply respect your efforts making Photonic, its rich functionality, quality and
level of supportcare about us.
The topic ‘Single google photo’ is closed to new replies.