From 8bf3b9e3ca1e1b209c783f20a55ddd989f6329cf Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Wed, 4 Feb 2026 00:15:05 +0100 Subject: [PATCH] fix image URLs --- app/views/json/screenshots.json.jbuilder | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/views/json/screenshots.json.jbuilder b/app/views/json/screenshots.json.jbuilder index 255093d..929ab7b 100644 --- a/app/views/json/screenshots.json.jbuilder +++ b/app/views/json/screenshots.json.jbuilder @@ -4,8 +4,14 @@ json.cache! ['json_screenshots'], expires_in: 1.hour do json.extract! s, :version json.extract! p, :maintainer, :name, :section, :maintainer_email, :homepage, :description json.url package_url(p.name, protocol: 'https') - json.thumb_image_url "#{request.protocol}#{request.host_with_port}#{s.simage_url(:thumb)}" - json.small_image_url "#{request.protocol}#{request.host_with_port}#{s.simage_url(:small)}" - json.large_image_url "#{request.protocol}#{request.host_with_port}#{s.simage_url(:large)}" + json.thumb_image_url "#{request.protocol}#{request.host_with_port}#{thumbnail_with_id_path( + p, s.id + )}" + json.small_image_url "#{request.protocol}#{request.host_with_port}#{small_image_with_id_path( + p, s.id + )}" + json.screenshot_image_url "#{request.protocol}#{request.host_with_port}#{screenshot_image_with_id_path( + p, s.id + )}" end end