Refreshing YouTube Thumbnail

Hey community,

I’m having a tricky time with the YouTube Thumbnail column. My client has updated the Thumbnails for her YouTube videos (in YouTube) but the App is not refreshing the images retrieved and displays a muddle between old and new. Maybe there is a memory Cache thing that needs refreshing?

It’s also odd that when I view the column (below) I see the tiny image of the old thumbnail in the table cell. When I click on the image as if to edit it then it displays the correct latest image. But only in the table editor, not in the App. In the app it persists with old thumbs.

I have tried creating a new column in Glide for a new set of YouTube thumbs pointing to the the same column of URL’s but no luck.

Any help or pointers please?

Simon.

Interestingly, when I create a draft post in Facebook with the YouTube URL, it correctly displays the new thumbnail.

Why would Glide store an old version and not refresh?

I’m guessing it’s caching, and since the url is not changing, it’s probably just pulling the cached image. You could maybe try altering the url or adding a dummy query parameter to see if that makes a difference.

1 Like

Ok I will try…

no luck… I added some random letters at the end of the URL and surprisingly it does return a thumbnail but it’s the old one again.

Also if you pick share to ‘X (Twitter) on YouTube’ on you get very different URL for the same video. Same issue though persists even with this new URL in Glide.

Well, I can replicate it with your url. I’m guessing it has something to do with a combination of how Glide has written that function and what youtube is actually returning for the image.

I have a piece of javascript code that I got from another user in the forum a few years back that does pretty much the same thing as Glide’s built in column. By default, my javascript returns the following url with an input parameter to get the ‘1’ image.

https://img.youtube.com/vi/vCuQuofdDcc/1.jpg

If I change it to get the ‘0’ image, then I get the new thumbnail.

https://img.youtube.com/vi/vCuQuofdDcc/0.jpg


I won’t pretend to know how all of it is supposed to work, how glide wrote their function, or how youtube handles thumbnails, but I’m guessing that Glide is requesting a certain quality image for the thumbnail, possibly a different quality image for the image preview in the data editor, and youtube is still holding on to that old thumbnail for some reason.

2 Likes

Thanks. Looks super promising. I will try that using a template column.

1 Like

If you are curious about the javascript, here is a link to another post that has it. For me, I put the url as the p1 parameter and ‘1’ as the p2 parameter. You may want to use ‘0’ instead. Might be overkill for your needs if a template column works well for you. The main advantage to the javascript is that it will also create thumbnails for videos hosted elsewhere, including videos hosted on Glide.

I believe that second p2 parameter has two uses. For youtube videos, it determines which image to grab. For videos hosted elsewhere, it will grab a thumbnail that many seconds into the video. That’s why I use a ‘1’, because I want a thumbnail at the 1 second mark.

2 Likes

Many many thanks Jeff…

My aversion to coding made me try with template columns… gave up after 30 mins. The Java script worked instantly and was easy to set up using the link you shared to the previous post.

Really appreciated.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.