Image styles using webP conversion return access denied for image file field using private file system

Created on 7 November 2022, over 2 years ago
Updated 28 January 2025, 3 months ago

Problem/Motivation

Image styles using webP conversion return access denied for image file fields that use the private file system.

Steps to reproduce

1. Add a Reference -> Image field "Profile pic" to the user entity.
2. For the "Profile pic" field settings, select "Private files" for the "Upload destination".
3. Create an image style "Profile webP" and add the "Convert" effect for "WEBP".
4. On the "Manage form display" tab for the user entity, set the "Preview image style to "Profile webP" and save.
5. Go to the People admin page and edit a user account. Upload a file for the "Profile pic" field. The preview image will fail with access denied.

If you remove the "Convert" effect or change the "Convert" from "WEBP" to "JPG" or another type, then you can see the preview. So it seems that "Convert" to "WEBP" only is broken.

Proposed resolution

Allow "WEBP" image styles to be served without access denied.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

9.4

Component

image system

Created by

πŸ‡―πŸ‡΅Japan ptmkenny

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States matthand Riverdale Park, Maryland

    I'm unable to find the duplicate ticket for this issue, not sure why it was closed and marked as a dupe. I'm setting back to active since I'm seeing this issue still in Drupal 10.4. This bug is causing thumbnails generated from a WEBP file to not load in the Media view page.

  • πŸ‡ΊπŸ‡ΈUnited States matthand Riverdale Park, Maryland

    Logging as a 10.4 issue.

  • πŸ‡¬πŸ‡§United Kingdom catch

    I managed to link back to this issue in #4 instead of the issue I thought this was a duplicate of, if I find it again I'll try to remember to post here.

  • πŸ‡³πŸ‡ΏNew Zealand quietone

    Drupal 10 is now an LTS, or in maintenance mode, and there are limited allowed changes for a maintenance minor release β†’ . This change is not eligible for commit.

    Does this problem exist in 11.x?

  • Status changed to Closed: cannot reproduce 6 days ago
  • πŸ‡¦πŸ‡ΊAustralia acbramley

    Tested this manually on HEAD and was unable to reproduce the access denied issue.

Production build 0.71.5 2024