2

We've been trying to get the custom coursework thumbnail working and have been unsuccessful so far. We've tried both a page URL and a url directly to a thumbnail image. We're using the PHP client like so:

...
$materialLink = new Google_Service_Classroom_Link();
$materialLink->setUrl("https://www.oursite.net");
$materialLink->setThumbnailUrl("https://i.ytimg.com/vi/m9We2XsVZfc/hqdefault.jpg");
$materials = new Google_Service_Classroom_Material();
$materials->setLink($materialLink);
...

However, instead of the custom thumbnail showing, the default (a snapshot of our crawled site) always shows as the the coursework thumbnail.

Has anyone successfully used the custom thumbnail feature?

Jeremy L.
  • 853
  • 8
  • 15
  • 2
    I think this is an intended behavior, as this [reported issue](https://issuetracker.google.com/issues/36760877): both the title and thumbnailUrl fields are read-only (in other words, you cannot set or modify them). I wasn't able to see if there where any feature request posted but feel free to create one just like the Googler mentioned. Hope this helps. – Mr.Rebot Jun 14 '18 at 15:38

1 Answers1

0

It's read-only. (thanks Mr.Rebot). The documentation notes that but it didn't resonate because you can set the thumbnail URL utilizing the methods, which seems a bit odd.

Jeremy L.
  • 853
  • 8
  • 15