Dymantic / laravel-instagram-feed

147 stars 51 forks source link

thumbnail_url for video type #32

Closed omarmatijas closed 3 years ago

omarmatijas commented 3 years ago

If you need to show image before launch video, get the thumbnail.

michaeljoyner commented 3 years ago

Hi @omarmatijas, thank you for the contribution, it is very helpful. I know that the thumbnail_url is only available for videos, but can you please add it to the array returned for images as well. You can either have the value be an empty string, or the image url. The reason is that I would like the array keys for video and image to be the same, so that if someone fails to check the media type they will not cause an exception. If you can kindly do that, I will merge this and update the readme.

omarmatijas commented 3 years ago

By the way, in same file (MediaParses.php) functions extractVideo and extractImage are not being used. Am I right? (Anyway, great job with this package!)

michaeljoyner commented 3 years ago

Thanks so much! Yes, you are correct, those seem to be left over from when the old API was being used. I will remove them.