Skip to content

Images invalidated #574

Open
Open

Description

@benydevfree

I'm struggling with invalidating my assets in nextjs. If I'm not wrong we cannot invalidate assets with cldUploadWidget so I'm using node sdk to upload with invalidate: true. Moreover, if I overwrite my asset, the cldImage still showing the old version of my asset. Where am I wrong because I've used this pattern with other platform and without cdn no problem. Maybe cloudinary is not what I should use or do I have to manage id of asset in database and remove old id with sdk? Quite lost for something that must be pretty common.

Activity

  1. denlahodnyi commented on Jan 16, 2025

    @denlahodnyi

    Resolved this issue by passing the image url to the CldImage src prop. Before that, I passed public_id, which prevents showing fresh image. I noticed that when you pass public_id, the final url always contains /v1/, while the full url returned from Cloudinary contains version parameter, which changes after every image overwrite.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions