Skip to content

Possible to load without caching? #588

Closed Answered by falkoschindler
2000Nic asked this question in Q&A
Discussion options

You must be logged in to vote

Sure, you can do that. One common approach is to add some dummy argument to the image source:

image = ui.image('https://picsum.photos/200/300.jpg').classes('w-40')
ui.button('Update').on('click', lambda: image.set_source(f'https://picsum.photos/200/300.jpg?t={time.time()}'))

See https://stackoverflow.com/a/729623/3419103 for a more detailed explanation.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rodja
Comment options

Answer selected by 2000Nic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #587 on March 21, 2023 12:07.