Image style that uses convert and private file system is not working

Created on 17 November 2022, over 1 year ago
Updated 19 September 2023, 10 months ago

Problem/Motivation

Open Social introduced a new image effect, "convert to webp". This effect is not working as intended when images are uploaded to a private file system.

The new effect was introduced here: https://github.com/goalgorilla/open_social/pull/3085

Steps to reproduce

  • Install Open Social with demo content
  • Create a post and upload an image
  • Instead of the thumbnail, a broken image will be displayed

This issue is related to drupal core, and it's also reported here https://www.drupal.org/project/drupal/issues/3310963 πŸ› Wrong file header returned, when converting an image for example to webp Active

Proposed resolution

Follow proposed solution on https://www.drupal.org/project/drupal/issues/2786735 πŸ› Image derivative generation does not work if effect "Convert" in use and file stored in private filesystem Fixed

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

πŸ› Bug report
Status

Fixed

Version

11.5

Component

Code (back-end)

Created by

πŸ‡³πŸ‡±Netherlands tbsiqueira Rotterdam

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.

  • πŸ‡©πŸ‡°Denmark lthomasen Aarhus

    I have just updated Open Social from social-11.4.11 to social-11.9.13 and are using private files. In my old installation upload destination for images was set to private files. However, with the update this has been reset to public files, and with the new image effect - "convert to webp" - these files can't be rendered, as access is denied for the generated image.

    • Setting upload destination for an image to private files does not work. Convert to webp for private images still displays access denied.
    • If I remove the "convert to webp" from the image style and flush the image style, the image style is rendered.

    I therefore deduce that "convert to webp" is the problem. Has anyone found a solution?

  • πŸ‡©πŸ‡°Denmark lthomasen Aarhus

    Examples of having .webp and not having .webp in the url

Production build 0.69.0 2024