Add an Image Editor to your Joomla image upload fields

Add CropGuide to your Joomla forms, set image requirements, and receive better images.

Joomla is an open source content management system. It helps you build powerful dynamic websites and applications. It has an intuitive interface that helps you use its features and functionality to the fullest.

Installing CropGuide

To get started we first need to create a CropGuide account

Log in to CropGuide and add your domain to the control panel.

The control panel will generate a unique script for your domain similar to the one shown below:

<script defer src="https://cdn.crop.guide/loader/l.js?c=123ABC">
</script>

With your CropGuide account created let’s log in to the Joomla admin.

  1. Install the Add Custom JavaScript plugin

  2. In the main navigation click Appearance

  3. In the Appearance sub menu click Editor

  4. Click function.php file in the files list on the right.

  5. Select the central text area and scroll to the end.

  6. Copy the script shown to the text area.

    // This will load the CropGuide service script
    function enqueue_scripts() {
        wp_enqueue_script(
            'cropguide',
            'https://cdn.crop.guide/loader/l.js?c=abcd1234',
            '', '', true
        );
    }
    
    add_action('wp_enqueue_script', 'enqueue_scripts');
  7. Replace the key abcd1234 with your unique domain key as shown on your CropGuide domain page.

  8. Click Update File to save the changes.

That’s it, CropGuide now loads on your WordPress pages.

Test it out by opening a page with a form and selecting an image.

Load CropGuide on selected pages only

If we want to load CropGuide on a subsection of pages we can add the is_page function to the script in the functions.php file.

function enqueue_scripts() {
    wp_enqueue_script(
        'cropguide',
        'https://cdn.crop.guide/loader/l.js?c=abcd1234',
        '', '', true
    );
}

$allowed_pages = array('contact', 'profile');

if (is_page($allowed_pages)) {
    add_action('wp_enqueue_script', 'enqueue_scripts');
}

The CropGuide script will now only load if the page slug matches the contact or profile.

That's it! CropGuide will now load and transform images when they're added to a file upload field on your Joomla page.

You can adjust the behavior of CropGuide in the control panel for your domain.

Please feel free to reach out to us if you any questions.

Learn more about CropGuide

Our photo editing technology is trusted by amazing companies

  • Dropbox
  • Square
  • ConvertKit
  • Funda
  • Global