Support » Plugin: WP Plugin Info Card » Plugin not loading images (since new plugin directory is online)

  • Resolved Marc Nilius

    (@zottto)


    Hi,

    the new wordpress.org plugin directory is onlien for some days now. Today I found out, that both banner and icon images of plugins are not loaded anymore.

    Is there a workaround for that? Or are you planning a plugin update to fix this?

    Thanks,
    Marc

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Brice Capobianco

    (@brikou)

    Hi Marc,

    Thanks for reporting this issue.

    The images URLs returned by the API have changed and are now better formatted. So it breaks the previous code.

    The issue is located in two files :

    • /wp-plugin-info-card\wppic-templates/wppic-template-plugin.php
    • /wp-plugin-info-card\wppic-templates/wppic-template-plugin-large.php

    Check lines 27 of both files and change :

    $bgImage = 'style="background-image: url(https:' . esc_attr( $icon ) . ' );"';

    by

    $bgImage = 'style="background-image: url(' . esc_attr( $icon ) . ' );"';

    Check lines 35 of both files and change :

    $banner = 'style="background-image: url(https:' . esc_attr( $wppic_data->banners[ 'low' ] ) . ' );"';

    by

    $banner = 'style="background-image: url(' . esc_attr( $wppic_data->banners[ 'low' ] ) . ' );"';

    I’ll try to update it asap, but I’m currently very busy.

    Best,

    Brice

    Plugin Author Brice Capobianco

    (@brikou)

    Hi Marc,

    Thanks for reporting this issue.

    The images URLs returned by the API have changed and are now better formatted. So it breaks the previous code.

    The issue is located in two files :

    • /wp-plugin-info-card\wppic-templates/wppic-template-plugin.php
    • /wp-plugin-info-card\wppic-templates/wppic-template-plugin-large.php

    Check lines 27 of both files and change:

    $bgImage = 'style="background-image: url(https:' . esc_attr( $icon ) . ' );"';

    by

    $bgImage = 'style="background-image: url(' . esc_attr( $icon ) . ' );"';

    Check lines 35 of both files and change:

    $banner = 'style="background-image: url(https:' . esc_attr( $wppic_data->banners[ 'low' ] ) . ' );"';

    by

    $banner = 'style="background-image: url(' . esc_attr( $wppic_data->banners[ 'low' ] ) . ' );"';

    I’ll try to update it asap, but I’m currently very busy.

    Best,

    Thread Starter Marc Nilius

    (@zottto)

    Hi Brice,

    thanks for the fast reply. The changes mentioned above fixed the issue.
    Hope to see an official update of the plugin soon.

    Thanks,
    Marc

    Thanks for the fix. Waiting for the update.

    But background image does nto show for me https://www.echodesplugins.li-an.fr/plugins/plugin-info-card/

    Plugin Author Brice Capobianco

    (@brikou)

    Guys,
    Plugin is up to date 😉
    Best,

    Thanks a lot.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Plugin not loading images (since new plugin directory is online)’ is closed to new replies.