Announcement

Collapse
No announcement yet.

Update src on Image Machine

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Update src on Image Machine

    Hi, I am testing something and need to update images from src to data-src. image machine keeps appending an src link rather than updating the data-src link. I am curious if anyone knows how to change the code from src to data-src because my attempts haven't worked.
    Chris Dye
    http://www.kseriesparts.com

  • Are you editing the PROD page,
    then Product Display Layout Image Machine section
    then Head Template
    You can see how it builds the gallery using javascript.
    It depends on the theme you're using of course.
    But instead of it having something like
    img.src = thumbnail_image;
    you would change that to load a px.gif or whatever you're doing
    and then add something like
    img.setAttribute('data-src', thumbnail_image);
    Colin Puttick
    I solemnly swear that I am up to no good...

    Comment


    • thanks, I will play around with that!
      Chris Dye
      http://www.kseriesparts.com

      Comment

      Working...
      X

      This website uses cookies to identify visitors, track visitors to our website, store login session information and to remember your user preferences. By continuing to use this site you agree to our use of cookies. Learn More.

      This website uses cookies. By continuing to use this site you agree to our use of cookies. Learn More.

      Accept