1.8.x Tính Năng: Avatar Resize (MyBB 1.8.x)

Preview

Tác giả: BabbelDud

Phiên bản: 1.0.0

Gửi lúc: 29/09/2025

Cập nhật lúc: 29/09/2025

User Profiles
Mô tả
Features
  • Automatic resizing of avatars during upload in the User Control Panel.
  • ACP settings: enable/disable, max width/height, JPEG quality.
  • Supported formats: JPEG, PNG, GIF (transparency preserved for PNG/GIF).

How it works
The plugin hooks into usercp_do_avatar_end. After MyBB completes the avatar upload, the image is proportionally downscaled if it exceeds your maximum values. The new dimensions are stored in users.avatardimensions. Smaller images are left unchanged (the dimensions field may be updated).

Installation

1. Upload the files from the upload/ folder into your MyBB root (e.g., via FTP).
2. Go to ACP -> Configuration -> Plugins and activate Avatar Resize.
3. Configure under ACP -> Configuration -> Settings -> Avatar Resize:
  • Enabled: on/off
  • Max width (px): default 200
  • Max height (px): default 200
  • JPEG quality (0–100): default 85

Notes
The plugin overwrites the uploaded file; no backup of the original is kept.
Features
  • Automatic resizing of avatars during upload in the User Control Panel.
  • ACP settings: enable/disable, max width/height, JPEG quality.
  • Supported formats: JPEG, PNG, GIF (transparency preserved for PNG/GIF).

How it works
The plugin hooks into usercp_do_avatar_end. After MyBB completes the avatar upload, the image is proportionally downscaled if it exceeds your maximum values. The new dimensions are stored in users.avatardimensions. Smaller images are left unchanged (the dimensions field may be updated).

Installation

1. Upload the files from the upload/ folder into your MyBB root (e.g., via FTP).
2. Go to ACP -> Configuration -> Plugins and activate Avatar Resize.
3. Configure under ACP -> Configuration -> Settings -> Avatar Resize:
  • Enabled: on/off
  • Max width (px): default 200
  • Max height (px): default 200
  • JPEG quality (0–100): default 85

Notes
The plugin overwrites the uploaded file; no backup of the original is kept.