• Hi guys,

    Nice plugin! I’d like to recommend it in combination with my CSS plugin, Microthemer. I’m currently writing a CSS/responsive design tutorial for beginners. There’s an issue however.

    Microthemer stores images that might be used as CSS background images in /wp-content/uploads. CSS background images should generally not be resized with AI. One workaround could be for the user to add no-ai at the end of any image names they want excluded (before uploading). They could then update their .htaccess file to exclude such images. Of course it would be easier for them if your plugin could do this via an “Exclude images (regex allowed)” field.

    Do you think this would be a useful feature for your plugin in general?

    Cheers,
    Sebastian

    https://www.ads-software.com/plugins/adaptive-images/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Takis Bouyouris

    (@nevma)

    Hi, Sebastian,

    Thank you very much for your kind words!

    (What is not widely mentioned is that our plugin may also work along the HTML5 responsive picture element that WordPress has added to its core TinyMCE integration.)

    Now about your suggestion:

    First of all, I hear what you are saying and it is always great to confront new ideas. It is a thought we have made ourselves, too, but, we considered it an unnecessary feature. At least up to now…

    One way to achieve what you are proposing would be to put the images you need to exclude from the plugin to a separate folder and then exclude the folder from being handled by the plugin altogether. I know
    this is not very flexible though, but it will work!

    One other, more flexible way, would be to add a URL parameter at the end of the image which we already provide for debug purposes. This the “?debug=original” parameter. Would this do the trick for you?

    Now, to be honest, I do not really see why one would want to exclude the images in CSS backgrounds especially. The bigger the images are the better job the plugin does in reducing their size. And one can always calibrate the JPEG compression at a desired level of quality. I mean this is what the plugin is actually designed to do in the first place, right? What is your opinion on this?

    All in all, this feature is not out of the question. I am just trying to understand the reasoning behind it first. Also, if this feature were to be added to the plugin I would suggest adding a URL parameter at the end of the image you wish to not be resized.

    Cheers,
    Takis

    Thread Starter Themeover

    (@bastywebb)

    Hey Takis,

    Yes, ?debug=original would do the trick! Thanks. Using an URL parameter is a much better suggestion. I’m not sure why I didn’t think of that.

    I hear what you’re saying about the folder, I just didn’t want this to turn into a big dev task.

    Regarding the need to exclude background images, I read this on the AI website:

    “You don’t need or want it re-sizing the images you’re using in your CSS for example. That’s fine – that’s what the .htaccess file is for.”

    I foresaw potential problems with CSS sprites if AI reduces background image size. And if the background-image-size property is set, the result would be downsized images shown at a larger size than their resolution. Resulting in blurring images. I haven’t got a case study to show you. I could be mistaken about a few things…

    Cheers,
    Sebastian

    Plugin Author Takis Bouyouris

    (@nevma)

    Well, image sprites is indeed a case where the plugin could cause issues. You are right about that, and thank you for pointing it out!

    However, all other cases of CSS backgrounds are totally up to the developer to decide whether they want the reduction that the plugin achieves or not. And, well, they should, in all other cases, otherwise they do not need the plugin.

    Cheers,
    Takis

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Ability to exclude images with regex’ is closed to new replies.