• Resolved nicmare

    (@nicmare)


    I use that awesome plugin to simply show only 4 images from instagram on my wp-page. So there are no special things going on. Just simple thumbnail images. No Lightbox, no header, no footer, no load more button, no ajax loading. just images. But your plugin calls jquery library nevertheless. Why? Can you please change it to conditional loading. Just load it when its really needed. Thank you!

    • This topic was modified 1 year, 10 months ago by nicmare.
Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support Smash Balloon Louis

    (@smashballoonlouis)

    Hi @nicmare,

    Thanks for your feedback! Currently, jQuery is a requirement of the plugin, but I have shared your feedback with our development team so they can investigate the possibility of making this optional/conditional or removing the dependency in the future.

    If you have any other questions or concerns, please let us know.

    Thanks!
    Louis

    Thread Starter nicmare

    (@nicmare)

    i know that it is a requirement of your plugin. And that is the issue of this topic here. In certain cases the plugin is loading jQuery for no reason. As i said i do not use any animations, loading more button stuff or similar. I just print thumbnails from the local uploads folder. So there is no reason to load additional JS at all. Even no need for instagram-feed/js/sbi-scripts.min.js.

    Plugin Support Smash Balloon Louis

    (@smashballoonlouis)

    Hi @nicmare,

    If you would like to prevent the loading of the plugin’s JavaScript altogether, please see this guide: https://smashballoon.com/doc/dequeing-the-plugin-files/. Please note that the code snippet there is also dequeuing the CSS file, so you’ll probably want to remove the line that dequeues sbi_styles.

    I hope this helps. We appreciate your feedback, and our development team will check into conditionally loading jQuery in the future.

    Thanks!
    Louis

    Thread Starter nicmare

    (@nicmare)

    yea cool thanks … that would be sufficient and it seems to work but then i realized the plugin uses javascript to even load the local thumbnails. otherwise you only see placeholders. thought JS is (and should) not necessary for displaying local images. ??

    Plugin Support Smash Balloon Louis

    (@smashballoonlouis)

    Hi?@nicmare,

    Sorry for the confusion, I may have misread your previous messages because I thought you already had the JavaScript image loading disabled. You can turn this off by going to WordPress Dashboard > Instagram Feed > Settings > Advanced, turning off JavaScript Image Loading, and clicking Save Changes. I believe it will work for you once you adjust that.

    Thanks!
    Louis

    Thread Starter nicmare

    (@nicmare)

    i think thats something else because i found that already. here is a loom as a proof: https://www.loom.com/share/db23d806585248579fef5db7b675a96f

    Plugin Support Smash Balloon Louis

    (@smashballoonlouis)

    Hi @nicmare,

    It could be an issue related to a caching or image optimization plugin. I did a test of this configuration on my end and it seemed to be working correctly. That being said, this isn’t really a supported configuration to have the plugin working without the JavaScript file, but I was hoping it may be a workaround you could use in this case. You may want to test with all other plugins deactivated and a base WordPress theme set first. Otherwise, I would have to suggest using the plugin as-is for now, and we’ll see about making the type of changes we discussed in the future.

    Thanks!
    Louis

    Thread Starter nicmare

    (@nicmare)

    i really doubt it works on your side because i found the issue. by default you set display: none to the img-elements. Therefore i only see the placeholder background-image. all i need to do, is to add a one line css code to overwrite the display rule to “block” and now it works!

    Thread Starter nicmare

    (@nicmare)

    one performance advice: would be nice to have a filter for the img attributes. in item.php line 55 you build the tag very static:

    <img src="<?php echo esc_url( $media_url ); ?>" alt="<?php echo esc_attr( $img_alt ); ?>">

    WP images support the attribute loading=”lazy”. Fully generated WP Attachment Image Example:

    <img decoding="async" loading="lazy" width="768" height="768" src="https://hohenzollern-fitness.de/2023/wp-content/uploads/2022/12/Fitnessbereich1-1-768x768.jpg" alt="" class="wp-image-386" srcset="https://hohenzollern-fitness.de/2023/wp-content/uploads/2022/12/Fitnessbereich1-1-768x768.jpg 768w, https://hohenzollern-fitness.de/2023/wp-content/uploads/2022/12/Fitnessbereich1-1-300x300.jpg 300w" sizes="(max-width: 768px) 100vw, 768px">

    so if you provide a filter, i could add parameters by my self like “loading” something like this:

    <img src="<?php echo esc_url( $media_url ); ?>" alt="<?php echo esc_attr( $img_alt ); ?>" <?php echo apply_filters("custom_img_attributes",array())?>>

    but as already discussed in another support thread, the whole frontend code needs to be rewritten.

    Thanks!

    Plugin Support Smash Balloon Louis

    (@smashballoonlouis)

    Hi @nicmare,

    Thanks for the update; I’m glad to hear you got it working! We appreciate the additional feedback and I will share this with our development team.

    Thanks!
    Louis

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Drop jQuery Library please’ is closed to new replies.