diff --git a/app/views/packages/_grid_thumbnail.slim b/app/views/packages/_grid_thumbnail.slim index 77bfbd1..92c331f 100644 --- a/app/views/packages/_grid_thumbnail.slim +++ b/app/views/packages/_grid_thumbnail.slim @@ -2,7 +2,9 @@ a.black href=package_path(name: pkg.name) div.grid-thumbnail - if pkg.screenshots.any? - img src=pkg.screenshots[0].url('small') + // TODO: smarter search for the beste screenshot instead of taking the first one + - screenshot = pkg.screenshots.first + = image_tag(screenshot.image.url(:thumb, timestamp: false), alt: screenshot.caption) - else img.screenshot src="/images/dummy/no-screenshots-upload-one.svg" div