[PR #57] [MERGED] Allow to serve WebP if explicitly requested #253

Closed
opened 2026-02-25 22:34:52 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/flyimg/flyimg/pull/57
Author: @baamenabar
Created: 3/25/2017
Status: Merged
Merged: 3/25/2017
Merged by: @baamenabar

Base: masterHead: serve-webp


📝 Commits (1)

  • 2afea00 Allow to serve WebP even when the requesting client does not explicitly support it

📊 Changes

2 files changed (+12 additions, -5 deletions)

View changed files

📝 config/parameters.yml (+2 -2)
📝 src/Core/Entity/Image.php (+10 -3)

📄 Description

Currently we only send a response with webp format if the headers state webp support, like Chrome.

We should serve WebP if explicitly requested, because it could be coming from a wget request or a curl request, that just wants the WebP format to store it or do something else.

Also updated the config name for enabling webP to auto_webp_enabled because it's what it does.

Today even with webp_enabled we can serve webp, which can be confusing.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/flyimg/flyimg/pull/57 **Author:** [@baamenabar](https://github.com/baamenabar) **Created:** 3/25/2017 **Status:** ✅ Merged **Merged:** 3/25/2017 **Merged by:** [@baamenabar](https://github.com/baamenabar) **Base:** `master` ← **Head:** `serve-webp` --- ### 📝 Commits (1) - [`2afea00`](https://github.com/flyimg/flyimg/commit/2afea0047188c7ec421709184c859939586344bf) Allow to serve WebP even when the requesting client does not explicitly support it ### 📊 Changes **2 files changed** (+12 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `config/parameters.yml` (+2 -2) 📝 `src/Core/Entity/Image.php` (+10 -3) </details> ### 📄 Description Currently we only send a response with webp format if the headers state **webp** support, like Chrome. We should serve WebP if explicitly requested, because it could be coming from a `wget` request or a `curl` request, that just wants the **WebP** format to store it or do something else. Also updated the config name for enabling webP to `auto_webp_enabled` because it's what it does. Today even with `webp_enabled` we can serve webp, which can be confusing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 22:34:52 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/flyimg#253
No description provided.