Avatar Upload
Single image upload with crop for user avatar/profile picture. Circular preview with aspect ratio lock.
What you should see: one image at a time (
.jpg, 5 MB max) with a circular preview and a locked aspect ratio. Choosing a second image replaces the first rather than adding to a queue.CoreUpload.create('#avatarUploader', {
uploadUrl: '/api/upload/upload',
allowedExtensions: '.jpg,.jpeg,.png,.webp',
maxFileSize: 5 * 1024 * 1024,
imagePreset: 'avatar',
autoUpload: true,
showProgress: true,
buttonText: 'Upload Avatar',
onTaskComplete: function(file, response) {
// show the uploaded image in the circular preview
}
});