• Resolved aksel777

    (@aksel777)


    Subject: Critical Bug: ProfileGrid Avatar Upload (crop.php) Incompatibility with WEBP and AVIF Formats

    To: ProfileGrid Support Team

    Hello ProfileGrid Support Team,

    We are using your ProfileGrid plugin on our project and are very satisfied with its features. However, we have encountered a critical incompatibility issue that makes it impossible to use the plugin on any modern, optimized WordPress site.

    The Core Problem:

    Your user avatar upload script (/public/partials/crop.php) is completely incompatible with modern image formats like WEBP and AVIF.

    On any site using an optimization plugin (in our case ASE Pro, but this applies to any: Converter for Media, Imagify, etc.) that converts images to WEBP or AVIF during the upload process, the avatar upload in ProfileGrid breaks completely.

    Technical Details:

    We have conducted a deep debugging session and identified the root of the problem:

    1. Custom Uploader: The crop.php script uses an old, custom method to process $_FILES['photoimg'] (line 8) instead of relying on the modern WordPress media library.
    2. Hardcoded Extension Filter: The script has a hardcoded allow-list: $allowed_ext ='jpg|jpeg|png|gif';. This prevents .webp or .avif files from passing validation.
    3. Processing Failure: Even if we modify that line to include webp and avif, the script still fails at the processing stage ($image->crop(...)) because the wp_get_image_editor (in the context of this legacy script) cannot correctly process and crop these formats.

    As a result, when an optimization plugin intercepts the upload to convert it to WEBP/AVIF, the crop.php script either receives nothing (triggering the PHP Warning: Undefined array key "photoimg") or receives a file it cannot process.

    Our Request:

    Since modern formats (WEBP, AVIF) are now the de-facto standard for performance and SEO, this issue is a major blocker.

    Could you please update the crop.php script (and any other custom uploaders in your plugin) to use the modern WordPress core functions for media handling (like wp_handle_upload)?

    This would automatically resolve all issues with WEBP, AVIF, and other future formats by leveraging the WordPress core, which has natively supported them since version 5.8.

    Our Environment:

    • WordPress: (Latest Version)
    • PHP: 8.3

    Thank you for your time and for a great plugin. We look forward to an update that resolves this issue.

    Sincerely, Aksel

Viewing 1 replies (of 1 total)
  • Hello @aksel777,

    Thank you for your feedback and for bringing this issue to our attention. We’re glad to hear you’re satisfied with the plugin’s features. We’ve identified the incompatibility problem and will address it in one of our future updates.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.