New-UDDynamic not AutoRefreshing

Product: PowerShell Universal
Version: 1.5.19

I am having trouble getting the auto-refresh to work with a UD dynamic region and an image. The image loads on the initial load of the page, but will not auto-refresh. Inside the UD dynamic is a UDImage cmdlet. What am I doing wrong?

New-UDStyle -Style $Cache:cardStyleLarge -Content {
    New-UDCard -Content {
        New-UDDynamic -Id 'at&t' -Content {
            New-UDImage -Url $attGraphUrl
        } -AutoRefresh -AutoRefreshInterval 30
    } -Elevation 3 -Title "AT&T"

And if it helps, here is my style string.

$Cache:cardStyleLarge = @'
   .MuiCard-root {
       min-height: 500px !important;

Can you try to put an -ID on the image to see if that helps at all? Sometimes react is finicky about refreshing things that it thinks haven’t changed.

Unfortunately, adding an -Id to the image didn’t change anything. It does seem as if the image is being pulled from a cache. I added New-UDTypography -Text "$(Get-Date)" -Variant h3 to the dynamic and I am seeing the date update at the 30-second interval.

Are you changing the URL on reload or is it static?

You might try putting a random query string value at the end of it.

$attGraphUrl += "?t=$(Get-Random)"
New-UDImage -Url $attGraphUrl

The URL is static, and the query string did the trick! Thank you Adam!