getgrav / grav-premium-issues

Official Grav Premium Issues repository to report problems or ask questions regarding the Premium products offered.
https://getgrav.org/premium
7 stars 2 forks source link

[instagram-feed] Show only the images from visible posts #418

Closed ohjay86 closed 3 months ago

ohjay86 commented 4 months ago

Hi, Is it possible to display only the images from currently visible posts? When I delete a post on Instagram, the image is still displayed in the Instagram feed on the Grav page. Is there a way to change this?

Thanks for your help Oliver

rhukster commented 4 months ago

Clear your Grav cache.

The instagram API calls and images are locally cached to get around the slowness of the API call, as well as the requet limits. Clearing Grav cache should cause a fresh API call and get the latest state.

ohjay86 commented 4 months ago

Hi thanks for your reply, I have deleted the cache. But the pictures are still there. I removed the deleted posts on Instagram from the trash and the pictures are still there. Is there another place where the Instagram data is cached?

rhukster commented 4 months ago

The actual images are copied to user/assets/instagram-feed, however, if you delete those, they might just show as broken images. Clearing the cache via CLI bin/grav clear --all or by simply deleting everything in the cache/ folder should cause the latest feed to be updated. I checked the code and while the image won't be physically removed from the user/assets/instgram-feed folder, it should not be referenced if the image/post is removed from instagram and the feed is updated.

ohjay86 commented 4 months ago

I've removed all images from user/assets/instagram-feed and now it seems to work.