BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Image Gallery

python
ios
rpi

#16

Hi Dmitry,

This is understandable, but… when we change the image, and click the Refresh button in the app at design time where we define the URL, surely the expectation is to flush the cache and fetch the image again? If, not what is the refresh button for?

I just updated 7 images that I use in an image gallery widget. No URL changes. 2 out of the 7 images have updated themselves. I have clicked the refresh on all 7 and I have tried editing the URL and setting it back again on one that won’t update to no avail.


#17

furthermore, explicitly setting the urls via

Blynk.setProperty(V20, "urls", "https://s3.amazonaws.com/etc/etc");

also does not flush the cached images/


#18

and the cache seems to be global too…

I added a new picture gallery to a new app, added one of the cached URLs, and it shows the old cached copy there also.

I have separately fetched the image via HTTP and verified it has been updated on the server.

I can provide the urls via private message. They are gif files hosted on amazon.


Android Open Beta. Version 2.27.2
#19

Please provide urls so we can check them. Maybe they are just not available. @BlynkAndroidDev FYI.


#20

Yep, of course, we are caching them, so they wouldn’t be downloaded every time. Ill remove cache for images reload logic in the image widget settings, so it will be possible to refresh them after a change


#21

sounds great - thanks. That will resolve my issue.

For others, though, I am wondering if a “flush” command may also be needed, such as
.setProperty(V20, “flushcache”…);

If someone wants to view a webcam and they have some other script updating the image, they will need to be able to flush the cache from code…

or

a no-cache option in the widget.


#22

Yep, there should be some cache option in the widget, for sure. We’ll think about that


#23

Yep, that’s a good idea to flush saved images on setProperty - I’ll implement it for nearest 2.27.2 release.


#24

no news about image buttons widgets ? :thinking:


#25

No new widgets at least during winter


#26

so, after the 20th of March :star_struck:
that’s a good news indeed Alexander !


#27

is this for python? because I am not even able to use the setProperty in the python code…


#28

FYI, I am not sure if the cached images invalided themselves after some days, or if you flushed them, but the new copies of the hosted files are now appearing in my app…
Flush/refresh still needed though… just adding the info that they did come right eventually.


#29

It will be available in 2.27.2 beta soon, like you proposed in urls set property command or refreshing image in its settings.


#30

I’m sorry but that includes IOS devices or only Android? Thanks


#31

only Android


#32

That’s odd, this post is for iOS also in android it updates automatically when the url change, at least for my 2 android devices that I’ve checked.
I suppose that if there is a lib update instead of app update it might be beneficial for the iOS devices too. Idk if that’s possible though.


Streaming video from uv4l to Blynk using nodered
#33

the caching is taking place on the server. So when the caching is improved it works for all clients.


#34

Hi all,

We just uploaded new beta release with 2.27.2 version with a fix to this issue:

  • “set property urls” command should refresh images memory cache
  • editing/refreshing image in image widget’s settings will refresh its memory cache too

#35

Good job Alexander !!