Skip to content

[Request] Saving to a currently-occupied slot clears out the old image first #13

@cviebrock

Description

@cviebrock

Right now, it just throws an SQL error: Integrity constraint violation: 1062 Duplicate entry ....

My repo code currently looks like this:

// clear existing first from the slot
if ($slot) {
    Imager::deleteBySlot($slot, $post);
}

// save new
$image = Imager::saveFromFile($file, $post, $attributes);

Just being able to saveFromFile and letting the package handle this for me would be cool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions