Image Thumbnail

I don't know if I am doing something wrong or not.

I am trying to add the images in a thumbnail (I am not doing sandwiches but outfits) and i just can't seem to get the images up.

I have tried renaming some to "clothing name - Thumbnail" but this does not seem to work.

I have copied the code text

Thanks

TeWal

var Outfits: Outfits

  var body: some View {

    NavigationLink(destination: Text(Outfits.name)){

      Image(Outfits.thumbnailName)

        .cornerRadius(3.0)
Accepted Answer
There are some possible problems you can generate here:

1) Check your Outfits model/Identifiable and see what var thumbnailName is returning.
Code Block
var thumbnailName: String { return name + "Thumbnail" }


2) Make sure you name you images in the Assets folder the right way and that you provide all images in 1x, 2x and 3x. You must have a full image and the thumbnail image



Thank you so much for your reply, I did find an error i put 'thumb' instead of 'Thumbnail' and it still didn't work.

I have made sure I have got all different sizes (x3 and x4) images and they are correctly labeled too.

Really not sure what I'm doing wrong...

Without code it is a bit of a guess but I think @frunny had you pointed in the right direction. From what you posted you have "clothing name - Thumbnail" for the Image name and now have
Code Block
var thumbnailName: String { return name + "Thumbnail" }

in your model which would produce "clothing nameThumbnail" and not match. The space-dash-space don't get added when you concatenate the strings. Try
Code Block
var thumbnailName: String { return name + " - Thumbnail" }

or change you image names to remove the space-dash-space.

A quick test of how your thumbnailName looks would be to temporarily replace the title text for
Code Block
Text(Outfits.name)
in the cell view with
Code Block
Text(Outfits.thumbnailName)
to see them in the list.
Image Thumbnail
 
 
Q