Avatar Upload Count Restriction — a feature discussion or integration topic from the APG vNext community forum.
APG vNext Integration Capabilities
- Authentication: ASP.NET Membership, Active Directory/LDAP, OAuth (Facebook, Twitter, Google)
- Email: Configurable SMTP, HTML templates, digest notifications, bounce handling
- Mobile: Responsive design + official Tapatalk integration from v5.5+
- Search: Built-in full-text search powered by SQL Server Full-Text Indexing
- Analytics: Google Analytics, Adsense, and third-party widget support
- CDN: Static asset CDN support configurable via admin panel
Browse the full list at Features Overview or ask in the support forum.
Restricting Avatar Upload Count in APG vNext
By default APG vNext allows members to change their avatar as often as they like. For communities concerned about avatar-change spam, storage abuse, or moderation overhead (reviewing uploaded avatars), it makes sense to limit how many avatar changes a member can make per day, week, or in total. This guide covers the built-in restriction settings and a custom implementation for more granular control.
Built-In Avatar Upload Restrictions
<!-- web.config: avatar upload limits -->
<appSettings>
<!-- Maximum avatar changes per member per day (0 = unlimited) -->
<add key="APG.Avatar.MaxChangesPerDay" value="3" />
<!-- Require admin approval for avatar changes -->
<add key="APG.Avatar.RequireApproval" value="false" />
<!-- Minimum days since last change before another is allowed -->
<add key="APG.Avatar.MinDaysBetween" value="0" />
<!-- Max avatar file size in KB -->
<add key="APG.Avatar.MaxFileSizeKB" value="200" />
<!-- Allowed avatar dimensions (pixels) -->
<add key="APG.Avatar.MaxDimensionPx" value="256" />
</appSettings>
Per-Group Avatar Restrictions
Different member groups may warrant different policies. New members (trial accounts) might be restricted to a Gravatar only, while veteran members can upload custom avatars freely:
-- Set avatar upload permission by group:
UPDATE apg_Groups
SET CanUploadAvatar = CASE GroupID
WHEN 2 THEN 1 -- Registered: yes
WHEN 3 THEN 1 -- Moderators: yes
WHEN 5 THEN 0 -- New Members: no (Gravatar only)
ELSE 1
END,
AvatarChangesPerDay = CASE GroupID
WHEN 3 THEN 10 -- Moderators: 10/day
WHEN 2 THEN 2 -- Registered: 2/day
ELSE 1
END;
Enabling Avatar Approval Queue
For communities with strict content policies, enable the avatar approval queue. Uploaded avatars are held in a pending state until an administrator or designated moderator approves them:
<add key="APG.Avatar.RequireApproval" value="true" />
<add key="APG.Avatar.ApprovalNotifyEmail" value="[email protected]" />
Members see a placeholder avatar until their submission is approved. The approval queue is accessible at Admin Panel → Users → Pending Avatars.
Storage Impact of Avatar Uploads
Avatars are small individually but accumulate significantly on forums with thousands of members who change them frequently. A 200KB avatar limit, with members changing avatars 3 times per day, means each active member adds up to 600KB per day to storage. For a community with 1,000 active members, this is 600MB/day if restrictions are not in place.
APG vNext does not automatically delete previous avatars when a member changes their picture — old avatar files accumulate unless the cleanup job is enabled:
<!-- Enable automatic old avatar cleanup -->
<add key="APG.Avatar.CleanupOldVersions" value="true" />
<add key="APG.Avatar.RetainVersionCount" value="1" />
<!-- Keep 1 previous version (allows undo), delete older ones -->
<add key="APG.Avatar.CleanupScheduleHours" value="24" />
Content Moderation for Avatars
Inappropriate avatar images (explicit content, offensive symbols, competitor branding) require a moderation workflow. APG vNext supports three approaches:
Approach 1 — Avatar Approval Queue
All new avatars go into a moderation queue before being visible to other members. Approved in batches by a designated avatar moderator. Best for communities with strict content policies.
Approach 2 — Community Flagging
Members can flag an avatar as inappropriate, which moves it to the review queue without requiring pre-emptive moderation of all avatars. Best for large communities where reviewing every upload is impractical.
Approach 3 — AI Content Filtering
APG vNext 5.x supports integration with external content moderation APIs (e.g., Microsoft Azure Content Moderator, Amazon Rekognition) to automatically scan avatar uploads for explicit content:
<add key="APG.Avatar.ContentModeration.Enabled" value="true" />
<add key="APG.Avatar.ContentModeration.Provider" value="AzureContentModerator" />
<add key="APG.Avatar.ContentModeration.APIKey" value="your-azure-key" />
<add key="APG.Avatar.ContentModeration.Endpoint" value="https://region.api.cognitive.microsoft.com" />
<add key="APG.Avatar.ContentModeration.Action" value="Reject" />
<!-- Action: Reject | Queue | Approve (auto-approve all, for testing) -->
Fallback Avatars for Members Without Custom Avatars
Members who haven't uploaded a custom avatar can be shown a generated avatar instead of a blank placeholder. APG vNext supports three fallback modes:
- Initials: generates a coloured circle with the member's initials (e.g., "JD" for John Doe)
- Gravatar: queries Gravatar using the member's email address hash
- Default image: shows a site-wide default avatar image stored at
/assets/images/default-avatar.png
<add key="APG.Avatar.FallbackMode" value="Initials" />
<!-- Options: Initials, Gravatar, Default -->
<add key="APG.Avatar.GravatarEnabled" value="false" />
<!-- Enabling Gravatar makes an external request per member without an avatar -->
Communicating Avatar Policies to Members
Clear communication of avatar upload policies reduces confusion and support tickets. Add a visible notice to the avatar upload page in your skin template explaining the allowed file size, dimensions, and content policy. Members are more likely to comply with restrictions they understand than to encounter opaque error messages. Include a link to the forum rules page from the avatar upload interface so members can review the image policy before uploading.
Related Resources
- Group Avatars in APG vNext 5.0
- Avatar Page IIS Hang Fix
- Restoring Broken Avatar Upload
- Knowledge Base
Looking for more help? Browse the support forum or check the Knowledge Base.