Problem/Motivation

This is a follow-up of #3136443: Webp support and #3332930: use_imagecache_root doesn't work with webp. The compatibility with the webp module only works with use_imagecache_root disabled. The cause of this is that webp removes the original file extension.

This used to work with stage_file_proxy and this old patch:
https://www.drupal.org/project/stage_file_proxy/issues/3136443#comment-1...

It basically added some possible extensions to the paths, which is not ideal.

There is also this issue in the webp issue queue, which is about adding the original extension to the URLs and therefore fix the issue:
#3281606: Rendering duplicate images when the original images have the same name but different extension

Steps to reproduce

  • Enable the use_imagecache_root configuration
  • Try to load images generated with the webp module using stage_file_proxy

Proposed resolution

TBD

Remaining tasks

  • Figure out if this should be solved in stage_file_proxy or the webp module.

User interface changes

None

API changes

None

Data model changes

None

CommentFileSizeAuthor
#2 include-query-params-3349119-1.patch565 bytesminirobot
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Lukas von Blarer created an issue. See original summary.

minirobot’s picture

StatusFileSize
new565 bytes

There is also this issue in the webp issue queue, which is about adding the original extension to the URLs and therefore fix the issue:
#3281606: Rendering duplicate images when the original images have the same name but different extension

When using the webp patch, I had to make a minor change in stage file proxy to include the query parameters in the request. I found that the image token parameter ?itok was needed in the request for the image.

I'm attaching the change I made as a patch.

smustgrave’s picture

Status: Active » Needs review

Don't mind committing that small change if someone can confirm the same.

  • smustgrave committed 4c6c6f70 on 2.0.x
    Issue #3349119: use_imagecache_root doesn't work with webp
    
smustgrave’s picture

Status: Needs review » Fixed
Related issues: +#3334239: 2.0.3 Release

With such a small change don't mind pushing

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.