Support » Plugin: DreamSpeed CDN (RETIRED) » Srcset to CDN

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Plugin Review Team Rep

    I’ve not been able to figure a way to change srcsets properly :/

    The issue is simply this: I have to filter them ONLY when the image is actually uploaded to the CDN.

    Which would be kinda ‘easy’ except that wrapping that check around a filter for a gallery page is painful :/ Lots of images.

    That would probably slow things down a good bit. I realize it’s not ideal (as people would have to redo all their posts), but what about some hook in the process where you check when the media is added to the gallery? Or maybe a checkbox on the post edit page that says “all images are in the CDN”?

    Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Plugin Review Team Rep

    There is actually a meta data setting for “This image is in the CDN”

    Doing the query on each one “Does this image have the setting? Yes? Okay change!” is not to terribly hard, it’s the damn resizes. I couldn’t find a single sane way to check “Is this RESIZED version on the CDN?” without actually checking for the image’s existence.

    For the majority of people, this is no problem. But if you ever change image sizes afterwards, or change themes (which can do that) or add a plugin (which … can do that…) then it breaks down.

    Ah, yes of course. I was looking at writing a srcset filter where I could just str_replace. That’s probably not worth putting into your plugin though.

    Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Plugin Review Team Rep

    Yeah, as much as I hate it, it’s making me rethink the entire plugin’s approach!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Srcset to CDN’ is closed to new replies.