Skip to content

[6.x] Delete remote image sources after each queued transform #20803

Open

Description

@timkelty

Description

ImageTransformHelper::getLocalImageSource() downloads a remote image's original into the asset sources directory, and deletes it in an app()->terminating() callback. A long-running queue:work process only terminates when it exits, so a worker that generates transforms for many remote images keeps every original on disk until it restarts, and can fill local storage.

This already happens on 6.x with the default maxCachedCloudImageSize of 0. #20780 removes that setting, so it will apply to every site.

The source should also be deleted after each queued job, for example from a JobProcessed/JobFailed listener, or a finally block in the job that generates the transform.

Related issues

Activity

  1. linear-code commented on Nov 17, 2026

    @linear-code
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    repo:cmsRepository: craftcms/cms

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions