cloudinary images on localhost

webadmin
webadmin Member Posts: 2
edited February 2024 in Developer APIs

I am building a site on Pantheon. Using Lando for local dev. I added images on local. Cloudinary is not syncing on localhost. On the dev instance of Pantheon it doesn't sync either because it says the images are External Images. When I run a systems report and try to download the site crashes with this error:

Fatal error: Uncaught Error: Call to a member function get_public_id() on null in /code/wp-content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/sync/class-storage.php:395 Stack trace: #0 /code/wp-content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-report.php(225): Cloudinary\Sync\Storage->size_sync(607) #1 /code/wp-content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-report.php(477): Cloudinary\Report->get_attachment_data(607) #2 /code/wp-content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-report.php(397): Cloudinary\Report->posts() #3 /code/wp-content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-report.php(370): Cloudinary\Report->generate_report() #4 /code/wp-content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-report.php(526): Cloudinary\Report->get_report_data() #5 /code/wp-content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-report.php(145): Cloudinary\Report->maybe_generate_report() #6 /code/wp-content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-plugin.php(465): Cloudinary\Report->setup() #7 /code/wp-includes/class-wp-hook.php(324): Cloudinary\Plugin->setup('') #8 /code/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #9 /code/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #10 /code/wp-settings.php(643): do_action('init') #11 /code/wp-config.php(86): require_once('/code/wp-settin...') #12 /code/wp-load.php(50): require_once('/code/wp-config...') #13 /code/wp-admin/admin.php(34): require_once('/code/wp-load.p...') #14 {main} thrown in /code/wp-content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/sync/class-storage.php on line 395

What is going on? Any suggestions would be appreciated.

Tagged:

Answers

  • Vdeub
    Vdeub Member, Cloudinary Staff Posts: 79

    Hi @webadmin,

    External media are media that have their guid that don't belong to your website domain.

    You can follow the instructions in this article: https://support.cloudinary.com/hc/en-us/articles/4456208611730-How-to-sync-external-media-assets to sync those assets.

    Would you mind sharing the plugin version you are using so I can investigate the log error you get?

    Thanks in advance.

    Best,

    Loic

  • webadmin
    webadmin Member Posts: 2

    Hi @Vdeub,

    I reimported all images on the Pantheon dev instance and that works. I am under some time pressure so don't have time to investigate this further. Thank you for repsonding.


    Werner

  • Vdeub
    Vdeub Member, Cloudinary Staff Posts: 79

    Hi @webadmin,

    You are welcome, glad it is working 😃

    Feel free to reach out here or via support@cloudinary.com if you need anything else.

    Best,

    Loic