I want to keep a photo and memories journal using dataview and obsidian. Such a dataview table would have the date of a memory as a link and an embeded memorable photo (only on the days I added one) from all notes tagged with my daily note tag # (see image example).
My current set up works… but it breaks at some point later and the google images that I add today won’t load/render after a week or so.
This is a major fragility in an otherwise lovely solution to scroll through past photo memories.
Could anyone help to make this concept less fragile?
I used to do something similar and experienced problem after problem with Google moving photos or otherwise wrecking links. I now post photos to imgur and paste a link to the photo (usually HTML which works well in 1Writer). This has worked for more than 2 years now and if you don’t want an HTML link there are a number of options. Photos can be public or private.
I definitely know the frustration with Google modifying/deprecating products. I used the method from this Stackoverflow post, where the image is still available at the same URL seven years later. (Critically to use a non-signed-in window to fetch the link.)
I don’t have the same length of history, but I can say the images are still available for me a few months later.
Interestingly I found out this morning that it also works for videos. I hadn’t tried it before.
Hi @AlanG, the templater script looks very nifty, thanks for posting.
do you recognise what cake I was trying to recreate in the photo above?
can you help me set up the templater script?
I googled curl command Templater obsidian.md and checked the templater docs for curl and js commands, but couldn’t make sense of what I need to do.
in the option “as an image (saved locally)”, you mentioned “save locally with a link back to the original image on google photos” - is this the private image in your personal google.photos library, or the public album archive page?
In the meantime, I appreciate sharing the Photos Direct Link chrome extension.
Hello I was planning on doing something similar but I haven’t gotten to it yet. I like your template though. Would you mind sharing again? The discord link above does not work or else I don’t have access? If you can, thanks.
TABLE WITHOUT ID file.link as "Date", photo-journal as "Photo Journal", memorable-meals-photo as "Memorable Meals Photo"
FROM #📓 AND -"_System"
SORT file.day desc
I added to your script an input type “banners photo” so that my google photos can be used as my daily note banner. I use templater to open today’s photos directly in the google photos search. I choose the photo, copy the share link, and then use a hotkey to insert the photo using your script.
The output looks great! Thanks for sharing your script. I have linked my changes to your github script page above.
In your weekly note, if you have the days of the week linked in a field called “Days::”, you can paste this dataview query to show a photo journal based on your banners. This is really something nice.
[!Photo]+ Photo journal
TABLE WITHOUT ID
link(days.file.link, dateformat(days.file.day, "ccc dd ")) as Date,
"![photo](" + days.banner + ")" as "_______"
WHERE file.name = this.file.name
I’m being a big n00b as I hardly use Templater but need the Google photos embed functionality! I can’t get the nice UI to show up (the one where I paste the URL of the photo). I’ve added the curl command and copied the content from the gist to a template file in the folder where I keep the templates. I tried both loading template modal and the regular insert template options but I just get the code copied into the new note. Does someone (author of the gist @AlanG?) have any suggestions on how to get this working?
Hi @AlanG! Thanks so much for your prompt reply! The extra bit I needed to do wasto remove the .md extension from the script file! And the expected UX comes up
I still get an error though (for both versions of the script on the gist). Any suggestions?
TypeError: Cannot read properties of null (reading '1')
at Object.main [as getGooglePhoto] (eval at <anonymous> (plugin:templater-obsidian:1:1), <anonymous>:30:108)
at async Promise.all (index 0)
at async eval (eval at compile (plugin:templater-obsidian:1:1), <anonymous>:8:14)
Hi @AlanG, on your github script I just updated my comment with my banners modifications (I didn’t actually copy paste my changes previously, sorry, although I trust you have already improved your script even more than my suggestions could!).
But speaking of suggestions and improving the script… I would like the banners function to always return its output on line 2 of the document. Can you do this easily or perhaps I could spend the next month working on this one little problem