Migrating image update automation to Flux v2

How to migrate the image update automation from Flux v1 to v2.