AWSPics icon indicating copy to clipboard operation
AWSPics copied to clipboard

Image URLs showing as undefined

Open taylorbrooks opened this issue 6 years ago • 6 comments

After uploading images to the source bucket, I can see that it successfully generates resized images and rebuilds the site.

However, the images won't display... On the main page, all of the image src attributes show undefined where the filename would typically be. And on an individual picture page, the image looks like it is missing altogether.

Any ideas?

screen shot 2019-02-19 at 9 36 24 am screen shot 2019-02-19 at 9 36 42 am

taylorbrooks avatar Feb 19 '19 15:02 taylorbrooks

I think I found out the issue. I think everything should be in a folder in the bucket. I just uploaded images to the bucket.

I'm curious how many levels of folders this can have and how awspics will handle it.

taylorbrooks avatar Feb 19 '19 15:02 taylorbrooks

Also, if I remove images from the source bucket, will something be smart enough to recognize that and clean up the site?

taylorbrooks avatar Feb 19 '19 15:02 taylorbrooks

My folder structure on my source website is

pics/
  original/
    Album Title 1/
      1.jpg
      2.jpg
      3.jpg
    Album Title 2/
      1.jpg
      2.jpg
      3.jpg
    Album Title 3/
      1.jpg
      2.jpg
      3.jpg

I'm curious how many levels of folders this can have and how awspics will handle it.

If I recall correctly, this is the only structure supported by the site as-is.

Also, if I remove images from the source bucket, will something be smart enough to recognize that and clean up the site?

Again if I recall correctly, no there's no clean up in place.

jpsim avatar Feb 19 '19 16:02 jpsim

Should there be a clean up in place? I'm happy to build the lambda funcs.

taylorbrooks avatar Feb 26 '19 17:02 taylorbrooks

It'd be great to have cleanup funcs, if you want to contribute them! Thanks for suggesting :)

jpsim avatar Feb 26 '19 23:02 jpsim

From my own testing, with making this publically accessible. The folder structure for the origin bucket must be as below, else the original copies link doesn't work either. I've also noticed it seems the site-builder creates false links to a "pics" album, which doesn't exist. I can only assume it's being pulled from the below structure and not being sanitized correctly? Sadly I don't know JS :-/

pics/
  original/
    Album Title 1/
      1.jpg
      2.jpg
      3.jpg

jsloan117 avatar Mar 31 '19 14:03 jsloan117