refactor(profile): move user pictures onto the storage disk
The avatar and the profile photo were addressed by hand in six places — two use cases writing them, two deleting them, the Twig runtime building the URL of one and a mutator of the user model building the URLs of the other — each with its own UPLOAD_PATH concatenation. Johncms\Users\UserImages owns the names now, and everything goes through the disk.
The port gains the two operations this needed: storeGenerated(), which hands the image processor a path to write to and puts the result on the disk (the counterpart of withLocalCopy), and lastModified(), which the cache-busting parameter of the avatar is built from.
Also drops the avatar_file variable the profile form passed to a template that never read it.
The port gains the two operations this needed: storeGenerated(), which hands the image processor a path to write to and puts the result on the disk (the counterpart of withLocalCopy), and lastModified(), which the cache-busting parameter of the avatar is built from.
Also drops the avatar_file variable the profile form passed to a template that never read it.