Skip to content

No way to apply processors to placeholder #823

@ertembiyik

Description

@ertembiyik

There is currently no way (or I haven't found it) to apply processors to placeholders and cache them.
It could be useful for cases where the loaded image and placeholder should have the same corner radius, blur, size, etc.

Also as an addition, it would be grate to add a localImage option to ImageRequest for cases where you want to use an already existing image with the power of processors in Nuke (I think under the hood it could be an alias to placeholder, but a more friendly higher api for the ones who try to find how to apply processors to an already existing image).

The new initializer for ImageRequest could look something like this:

public init(
        id: String,
        image: PlatformImage,
        processors: [any ImageProcessing] = [],
        priority: Priority = .normal,
        options: Options = [],
       userInfo: [UserInfoKey: Any]? = nil
    )

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions