Image component not working with static resource and file path

  • 1
  • Problem
  • Updated 1 year ago
  • Acknowledged
Here's the setup:


When I download the static resource and open the file it shows up just fine, but the image component won't render it.

Running 8.15.17

Any thoughts?
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb

Posted 1 year ago

  • 1
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 11,040 Points 10k badge 2x thumb
Hi Matt, are there any browser console errors showing up?
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 11,040 Points 10k badge 2x thumb
I was able to upload a static resource (a zip file with an image inside), and link to it without trouble in an 8.15.17 org just now. A screenshot is attached below (and perhaps confusingly, the image I used in my test static resource is a screenshot itself). 

Did this come up while you were building something new, or is this an image component that has stopped showing an existing image? 
Could there be a typo in the resource name or file name? 
Also, it might be worth testing out an image component in a brand new page, connected to this static resource + image, in case there's something specific to the existing page you're working on. 

Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Thanks, Mark. Are there any size limits on the images? I'm not at work now so I can't check the size, but I was just thinking that the one I was using may be rather large. I'll test it on a brand new page.
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 11,040 Points 10k badge 2x thumb
I know that Salesforce has a size limit on static resources of 10 MB. But if you had run into that, you wouldn't have been successful in uploading the resource. Skuid doesn't have any limits on file size, but you may be able to do some investigating by opening the network tab in the browser console and loading the page, to watch files load.

Do you see any errors in the console? And, does the image fail to load when previewing the page as well, or does it only fail to load in the page builder?
(Edited)
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Mark,

I'm getting a 404 from the server. It looks like the problem is only when the file path contains a space. Not sure if that's a skuid problem or a salesforce problem.

I can change all the file names to remove the spaces, and that looks like it will work, but it would be handy if skuid could intelligently handle spaces in image file names (or interpret however SFDC handles them).

Thanks!
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 11,020 Points 10k badge 2x thumb
Thank you for following up. I've just reproduced this issue. The space does seem to be the culprit, and trying to encode for it with either a + or %20 doesn't allow the file to load. I am not familiar enough with the back-end of files within static resources, so I don't know where a change would need to be made, but I will submit this to our developers, since it would be good to have a way of checking for this. 
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Thanks!