WordPress.org

Forums

Get the Image
Images disappeared after upgrading to version 1.0.0 (4 posts)

  1. Justin Tadlock

    Plugin Author

    Posted 10 months ago #

    This is a general notice to everyone experiencing this problem. I've seen several cases of it. In all cases, it was because a theme author was using a feature that was deprecated 4 years ago in this plugin, which was way back when version 0.5.0 was released.

    Because I felt that sufficient time had passed for theme authors to upgrade their code, this deprecated feature was removed in version 1.0.0. Frankly, 4 years is a long time to hold onto legacy code. There's only so much bloat I'm willing to keep around.

    How to fix

    Each theme is going to be different, so I can't tell everyone the exact changes they'll need to make within their theme. It'd be better to point your theme author here.

    The problem arises when using the array value for the format argument, which would be something like:

    $image = get_the_image(
    	array(
    		'format' => 'array'
    	)
    );

    That's fine. The problem is when the theme tries to use $image['url']. That code should be $image['src']. It should be a simple fix for theme authors to make.

    Avoiding problems like this in the future

    If you're a theme author, please keep track of changes to the plugin as they're made. Version 1.0.0 has been in development for several months and live on its GitHub repository.

    You can keep track of the plugin's development here:
    https://github.com/justintadlock/get-the-image

    https://wordpress.org/plugins/get-the-image/

  2. Justin Tadlock

    Plugin Author

    Posted 10 months ago #

    If you're reading this and using a theme from ThemeForest or SoloStream, I can almost guarantee this is the issue you're having. Please encourage your theme authors to update their code.

  3. vtmiller
    Member
    Posted 10 months ago #

    Any chance in the mean time you could post/share an older copy we could divert back to for temporary quick fix? Great explanation BTW of the issue!

    [update] issue solved:

    Found versions. https://github.com/justintadlock/get-the-image/releases

  4. supersuphot
    Member
    Posted 6 months ago #

    Comfirm that fixed the problem with SoloStream theme.

    Thanks for look into it :)

Reply

You must log in to post.

About this Plugin

  • Get the Image
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.