Title: Cannot upload images
Last modified: March 30, 2021

---

# Cannot upload images

 *  [ezradallas](https://wordpress.org/support/users/ezradallas/)
 * (@ezradallas)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/cannot-upload-images-54/)
 * I no longer have the ability to upload images. I have tried on safari and chrome
   and cleared cache/cookies. I have never had an issue in the past. When I click
   on add files, nothing happens. When I hit upload files this does flash so quick
   I had to press it 8 times to get the full message. **Your browser does not have
   flash or html5 support. Check also if page have no JavaScript errors.**
 * Avada 7.3
    Wordpress 5.7 PHP 7.4
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcannot-upload-images-54%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Martin von Berg](https://wordpress.org/support/users/martinvonberg/)
 * (@martinvonberg)
 * [5 years ago](https://wordpress.org/support/topic/cannot-upload-images-54/#post-14575297)
 * The same for me!
    I tried all options that are available to upload images: – 
   import from WP media Library – import from Server folder – upload from local 
   directory None, of this methods works
 * Error message for method I and II:
    Import from WP Media Library: Fatal error:
   Array and string offset access syntax with curly braces is no longer supported
   in /var/www/web123/html/wordpress2/smrtzl/plugins/grand-media/inc/pel/PelDataWindow.
   php on line 542
 * Error message for method III:
    Fails with HTTP-Error 500: “Upload URL might be
   wrong or does not exist.”
 * My opinion: Do NOT buy this plugin!
 * Server-Info:
    WP: 5.7.2 PHP: 8.0 Gmedia-Plugin: last available Server: apache
    -  This reply was modified 5 years ago by [Martin von Berg](https://wordpress.org/support/users/martinvonberg/).
 *  [Martin von Berg](https://wordpress.org/support/users/martinvonberg/)
 * (@martinvonberg)
 * [5 years ago](https://wordpress.org/support/topic/cannot-upload-images-54/#post-14576350)
 * As I do not expected the author of this plugin to react:
    The reason is the outdated
   PHP-Library ‘PEL’ that is used by the Gmedia-Plugin. Gmedia uses PEL but did 
   obviously never update the code of this PHP-library. An update of PEL is available
   on Github, even for PHP 8. The way is now to change the PHP-files of gmedia. 
   Mind that all changes will be lost, if we get an update of gmedia once.
 * Solution for people with coding experience:
    1. Do a backup of the gmedia-plugin
   folder, and even better your whole wordpress site. 2. Download current pel from
   github: [https://github.com/pel/pel](https://github.com/pel/pel) to your machine.
   3. Extract the ./pel/src – Folder of pel to ../wp-content/plugins/grand-media/
   inc/pel 4. Change the one and only function in autoload.php in the folder /wp-
   content/plugins/grand-media/inc/pel to:
 *     ```
       function gmedia_pel_autoloader($class) {
           if ( substr_compare ( $class, 'lsolesen\\pel\\', 0, 13 ) === 0) {
               $file = str_replace('lsolesen\\pel\\', '', $class );
               $load = realpath(dirname(__FILE__) . '/' . $file . '.php');
               if($load !== false) {
                   include_once realpath($load);
               }
           }
       }
       ```
   
 * 5. Change the code in core.php in ../wp-content/plugins/grand-media/inc:
    All
   occurences of Pel… to \lsolesen\pel\Pel. (pel introduced a namespace). I changed
   lines: 1959, 1964, 1979, 1980, 1982, 1997, 1998, 2005, 2006, 2013, 2014, 2021.
   I did not change line 2027 for the Exception. Example: >> 1959 \lsolesen\pel\
   Pel::setJPEGQuality( 100 ); 6. Upload the new pel-folder and the core.php to 
   your site. Test. For me this solved the problem
    -  This reply was modified 5 years ago by [Martin von Berg](https://wordpress.org/support/users/martinvonberg/).
    -  This reply was modified 5 years ago by [Martin von Berg](https://wordpress.org/support/users/martinvonberg/).
 *  [ISeeTWizard](https://wordpress.org/support/users/datateam/)
 * (@datateam)
 * [5 years ago](https://wordpress.org/support/topic/cannot-upload-images-54/#post-14576429)
 * I use the plugin now for a long time on several sites and no issues?? On one 
   it‘s the bought version and on others the free version is enough…
    I use also
   PHP 7.4 and upload every several days… So is that problem realy due to PHP? Or
   just related to PHP 8 which is not yet used on many server providers?? Thanks
   for the info…
 *  [Martin von Berg](https://wordpress.org/support/users/martinvonberg/)
 * (@martinvonberg)
 * [5 years ago](https://wordpress.org/support/topic/cannot-upload-images-54/#post-14578166)
 * The background is that curly braces for string / array access are deprecated,
   even in PHP 7.4. The outdated version of PEL uses curly braces. PEL is written
   in PHP, so it as PHP problem of PEL. It is not recommended to use PHP 5.x anymore.
   PHP 7.4 obviously ignores the curly braces, as Gmedia is working on your site(
   s) and many others.
    So the recommendation is: Do not update your server to PHP
   8 if you are using the Gmedia Plugin and do NOT want to fiddle around with the
   code, as I did. I just wanted to have the work-around documented, maybe it will
   help another person sometime.
 *  Thread Starter [ezradallas](https://wordpress.org/support/users/ezradallas/)
 * (@ezradallas)
 * [5 years ago](https://wordpress.org/support/topic/cannot-upload-images-54/#post-14579389)
 * I am also on PHP 7.4, not 8 and having issue. This worked for me as a work around:`
   I have the same issue I submitted a contact form over at https://codeasily.com/
   with this issue. Hopefully we see a fix for this soon. It’s related to JQuery
   and if you need this to work NOW you can use the “Enable jQuery Migrate Helper”
   WordPress Plugin to get it working again. Just install the plugin access it under“
   Tools” in WordPress an set the “jQuery Version” to “Legacy XXXX”. As the plugin
   will tell you….this is NOT a solution, only a work around until the Gmedia Plugin
   code is updated to use a newer version of JQuery.`

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Cannot upload images’ is closed to new replies.

 * ![](https://ps.w.org/grand-media/assets/icon-256x256.png?rev=1484725)
 * [Gmedia Photo Gallery](https://wordpress.org/plugins/grand-media/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/grand-media/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/grand-media/)
 * [Active Topics](https://wordpress.org/support/plugin/grand-media/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/grand-media/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/grand-media/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [ezradallas](https://wordpress.org/support/users/ezradallas/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/cannot-upload-images-54/#post-14579389)
 * Status: not resolved