loading other images as max-width

hey support,
is there any option you suggest to load different images depending on screen width in Hover Box?

i just want to load smaller ones for mobile users to make the site run faster.

thanks

Comments

  • Hi,

    we are sorry but we do not have any such feature included and we can not suggest anything because what you ask for requires a lot of customization.

    Thanks for understanding!
  • edited December 2015
    Hey,
    can you tell me where my way of thinking went wrong, I found some kind of  solution

    1. added a class 'spacer' to the Hover Box I'm interested in
    2. uploaded small (480x60) photos into full-width Hover Box
    3. named photos xxx_small.png
    4. added also bigger imgs named xxx_big.png and xxx_bigger.png
    4. added script to the footer:

    function resizeImages() { var width = window.innerWidth || document.documentElement.clientWidth; $(".spacer img").each(function() { var oldSrc = $(this).attr('src'); if (width >= 768) { var newSrc = oldSrc.replace('_small.','_bigger.'); var newWidth = 800; var newHeight = 100; } else if ( width >= 480 ) { var newSrc = oldSrc.replace('_small.','_big.'); var newWidth = 1600; var newHeight = 20; } $(this).attr('src',newSrc); $(this).attr('width',newWidth); $(this).attr('height',newHeight); }); }

    and it's still not workin
  • If you will read Item Support Policy, you understand that files customization are not included. What you ask for, requires files customization because first 4 points looks fine so the problem may be with your script. If you don't know what may be wrong, we suggest to contact with your website developer.
Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.