WordPress.org

Forums

WP Retina 2x
[resolved] Feedback - Ignore SVG file type (9 posts)

  1. hulsman1986
    Member
    Posted 1 year ago #

    Hi Jordy, you're awesome.

    :D

    Some feedback; can SVG file types be ignored by your plugin? Cause SVG's are already responsive and all, so they won't need a retina version.

    Thanks!

    https://wordpress.org/plugins/wp-retina-2x/

  2. Jordy Meow
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks! Which method are you using?

  3. hulsman1986
    Member
    Posted 1 year ago #

    Currently using retina.js within your plugin. Mainly because i am behind numerous caching solutions. So the html rewrite option won't work :P

    Example;
    http://prntscr.com/3wn0qm
    http://staging.mobileportal.spele.nl/spelletjes/jelly-collapse/

  4. macbookandrew
    Member
    Posted 4 months ago #

    I’m using the Picturefill method, though the retina.min.js file is still being included on the frontend.

    Perhaps you could add a "Disable for SVG" option in the settings that would in turn add data-no-retina to the img tag as described here: https://github.com/imulus/retinajs/issues/30#issuecomment-50786874

    Thanks for a great plugin!!

  5. Jordy Meow
    Member
    Plugin Author

    Posted 4 months ago #

    Using PictureFill the Retina.js is not included. It might be included by your theme or something else? Plus your pointing at a thread abotu Retinajs even though this is not the one you should be using?

    Normally SVG shouldn't be covered by the plugin because there is no @2x so it just wouldn't be included in the HTML. That should all work fine already.

  6. macbookandrew
    Member
    Posted 4 months ago #

    Sorry, I use your plugin on nearly all sites that I use. On this specific site, I was testing the RICG Responsive Images plugin and it’s producing the behavior above with retina.js.

    Regardless, of the WP plugin, retina.js seems to look for @2x SVG files unless you specify the data-no-retina attribute, so it may still be useful to add as a WP option for that method.

    Thanks again, and sorry about my confusion!

  7. DrewHammond
    Member
    Posted 2 months ago #

    I'm also experiencing this problem on a site I've developed. My WP Retina 2x settings are all default (Picturefill method). I see retina.min.js being loaded in the source and it's attempting to load the svg logo in the footer as @2x.

    Here's the site:
    https://wepicksports.com

    I can't think of an instance where an SVG image should ever be "retinafied" since it's a vector format. So the ability to toggle "Disable for SVG" is an unnecessary feature imo.

  8. DrewHammond
    Member
    Posted 2 months ago #

    For what it's worth, I just got the plugin to stop loading retina.min.js (and to start loading picturefill.min.js) by switching the method to something else, saving the options, and then switching it back to picturefill. So the bug must lie somewhere around that area.

  9. Jordy Meow
    Member
    Plugin Author

    Posted 2 months ago #

    It seems it's a problem with Retina.js. Probably they have a reason to do so,
    I am not sure.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Retina 2x
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic