Stage File Proxy - WEBP images issue

Created on 16 May 2024, 8 months ago
Updated 5 June 2024, 7 months ago

Problem/Motivation

Stage File Proxy gets an error because it tries to download a WEBP image without the extension.

Location

/sites/default/files/styles/featured_large/public/2023-10/image.webp?itok=ABCD

Message

Stage File Proxy encountered an error when retrieving file /sites/default/files/styles/featured_large/public/2023-10/image. Client error: `GET /sites/default/files/styles/featured_large/public/2023-10/image?itok=ABCD` resulted in a `404 Not Found` response: Error generating image, missing source file. in GuzzleHttp\Exception\RequestException::create() (line 113 of /var/www/html/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php).

Steps to reproduce

When Stage File Proxy is trying to download an image with the .webp extension it adds a path without the extension to the array (see here https://git.drupalcode.org/project/stage_file_proxy/-/blob/2.1.x/src/Eve...), after that, it fetches to the server each path but if the image on the server only works with the extension otherwise return 404.

Proposed resolution

I think we need a break/stop on the loop (https://git.drupalcode.org/project/stage_file_proxy/-/blob/2.1.x/src/Eve...) when the image was already download with the extension.

πŸ› Bug report
Status

Closed: outdated

Version

2.1

Component

Code

Created by

πŸ‡ͺπŸ‡¨Ecuador alexanderpatricio

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024