Use hi-res pet images in face picker for new item previews

This commit is contained in:
Emi Matchu 2024-09-03 17:34:31 -07:00
parent 9f44fd47e4
commit a88fc14bd7
2 changed files with 9 additions and 1 deletions

View file

@ -165,6 +165,10 @@ body.items-show
display: block
position: relative
img
width: 50px
height: 50px
input[type=radio]
position: absolute
left: -10000px

View file

@ -246,7 +246,11 @@ module ItemsHelper
def pet_type_image(pet_type, emotion, size, **options)
src = pet_type_image_url(pet_type, emotion:, size:)
image_tag(src, **options)
srcset = if size == :face
[[pet_type_image_url(pet_type, emotion:, size: :face_2x), "2x"]]
end
image_tag(src, srcset:, **options)
end
def item_header_user_lists_form_state