How to fix ownerProfileImage not displaying in Memberstack despite using the custom srcset clearing code?

Post author
ilyas el megarbi
Hey guys i have an issue which the ownerProfileImage is not showing, i already uploaded this custom code that you guys provided me with but still the image is not showing, here is the custom code to force it to be shown:
<script>  document.addEventListener("DOMContentLoaded", function() {    setTimeout(function() {      for (var i = 0; i < document.getElementsByClassName("c-comment-img").length; i++) {          document.getElementsByClassName("c-comment-img")[i].srcset = "";      }    }, 2000);  });</script>
------here is the link to register and test it out: www.skill.ma/fiverr-starter-course/fiverr-starter
I would appreciate the help guys

Comments

1 comment

  • Comment author
    Raquel Lopez

    Your image class is comment_image and your code is trying to change this class called c-comment-img , because it doesn't exist it doesn't change anything.
    You can replace the non existent class for the one you have on Webflow

    <script>
      document.addEventListener("DOMContentLoaded", function() {
        setTimeout(function() {
          for (var i = 0; i < document.getElementsByClassName("c-comment_image").length; i++) {
              document.getElementsByClassName("comment_image")[i].srcset = "";
          }
        }, 2000);
      });
    </script>
    
    0

Please sign in to leave a comment.