Skip to main content
Galeodan
Known Participant
June 21, 2021
Answered

Trouble Putting Dependent srcset Images to Server

  • June 21, 2021
  • 1 reply
  • 1144 views

Is there an issue with putting dependent srcset images to servers? I am learning how to post to local and remote servers and have posted separately on that particular struggle. Meanwhile, I have managed to a few puts which have transferred the main and dependent files to another server, but in every case, some scrcset images are being left behind. Here is the speific code:

 

        <picture>
            <source
                media="(max-width: 600px)"
                srcset="images/banner-sunset-text-4x6.jpg"
                alt="Narrow"
            />
            <source
                media="(max-width: 1100px)"
                srcset="images/banner-sunset-text-16x9.jpg"
                alt="Medium"
            />
            <img src="images/banner-sunset-text-fullsize.jpg" alt="Wide" />
        </picture>

 

When I put to a server only the final src image is copied over - the srcset images are NOT transferred. 

If I copy the files over manually, it all works OK. The correct picture pops up at the specified widths.

 

    This topic has been closed for replies.
    Correct answer Nancy OShea

    I've been using Netobjects Fusion for so many years, I assumed DW would have the smarts to identify and then publish only the files actually in use. It certainly seems to be trying - If I publish from the menu with: Site \ Put Ctrl+Shift+U, it publishes only the dependent files, including all images -  Except for the srcset image files. 

     

    Keeping track of all the drafts and images that get added and then dropped as I develope the site can be pretty time-consuming. I expected DW to help with that. Perhaps when I get more proficient, with more languages, I will find some use for DW but so far I really haven't. Except for the forum, that is - That's been worth the price of admission 🙂


    I haven't been in the NOF ecosystem for many, many years.  But AFAIK, they went out of business long before the <picture> property was adopted by the W3C.  

     

    There are many things that DW can't manage for you as dependant files like external assets hosted on CDNs, absolute URLs and external media files like PDFs and alternate SRCSET images. Honestly, I don't know of any code editor that can do that.  When you find one, let me know. 😉

     

     

     

    1 reply

    Nancy OShea
    Community Expert
    Community Expert
    June 22, 2021

    Open Files Panel (F8).

    Click on images folder and hit the UP arrow.

     

    Nancy O'Shea— Product User & Community Expert
    Galeodan
    GaleodanAuthor
    Known Participant
    June 22, 2021

    I have tried that and it puts the srcset files - But also every file in that folder, including drafts, unused images etc. I was hoping for a smarter put - That puts only the necessary (dependent files).

    Jon Fritz
    Community Expert
    Community Expert
    June 22, 2021

    Image files need to be uploaded separately from the pages that link to them, whether you use <picture> or plain <img> tags, srcset or not.

    It's the way DW has always worked, and likely the way it always will. Especially with the near total lack of understanding that the program has for srcset and the <picture> tag.