Stage File Proxy - WEBP images issue

Created on 16 May 2024, about 1 year ago

Problem/Motivation

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

# Location
https://www.example.com/sites/default/files/styles/featured_large/public...
# Message
Stage File Proxy encountered an error when retrieving file https://www.example.com/sites/default/files/styles/featured_large/public.... Client error: `GET https://www.example.com/sites/default/files/styles/featured_large/public...` 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

Active

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