scaleflex/js-cloudimage-responsive

2 suggestions: W3C validation + prevent enlargement

Closed this issue · 5 comments

Hi,

I started to use the plugin and many features are really great, but I encounter 2 problems:

  1. I wonder why you set the plugin to use ci-src instead of data-src
    data-src is validated with W3C but ci-src is not.
    Is there a workaround? (it may be an idea to allow users to set their preference)

  2. I couldn't find a way to keep the images within their original dimensions.
    For example: I have a 750px wide image. I want it to be reduced on small screens, but I don't want it to be larger than 750px on large screens. By using the width and/or prevent_enlargement settings, the loaded image has the right dimensions, but the wrapper is 100% wide.
    I haven't found a solution except to load the image directly from the Cloudimage URL without using ci_src, which is not ideal.
    Is there a way?

Thank you for your answer

Would it be possible to add a data-* variant for all your custom attributes on images like ci-sizes? Those still invalidate the HTML which could easily be avoided.

hey @Shackless ,

Yes, to all params you can use data-* variant

data-ci-sizes doesn't work while ci-sizes does.