<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: srcsets with hubl in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/srcsets-with-hubl/m-p/1121074#M42418</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/907961"&gt;@DChimenti20&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;don't worry about getting locked out of a dev portal.&amp;nbsp;&lt;BR /&gt;If you've created it via &amp;nbsp;&lt;A href="https://developers.hubspot.com/" target="_blank"&gt;https://developers.hubspot.com/&lt;/A&gt;&amp;nbsp;you got a so-called app-test account in this one you've - most likely - have created a CMS sandbox in which you're doing the practicum.&lt;/P&gt;
&lt;P&gt;If so, simply login into the app-test account and renew the trial. Trials are always for 90 days and none of your process will be lost if you somehow forget to renew it before the 90 days expire.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2025-03-11 um 18.00.55.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/140669i909CAF2DC5CCD03E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2025-03-11 um 18.00.55.png" alt="Bildschirmfoto 2025-03-11 um 18.00.55.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;There are a few things that will stop working, but once you renew the trial everything will work just fine.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pro tip: If you want to move things between portals, you can do it via Design-Manager. Simply right-click on a theme/folder and select "copy to different account".&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2025-03-11 um 21.45.42.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/140688i0E965AC112D97189/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2025-03-11 um 21.45.42.png" alt="Bildschirmfoto 2025-03-11 um 21.45.42.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you like to go the &lt;A href="https://developers.hubspot.com/docs/guides/cms/setup/getting-started-with-local-development" target="_blank" rel="noopener"&gt;CLI route&lt;/A&gt; - also possible. Simply authenticate both portals, fetch it from one to local and upload it to the other. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have fun&lt;/P&gt;</description>
    <pubDate>Tue, 11 Mar 2025 20:49:37 GMT</pubDate>
    <dc:creator>Anton</dc:creator>
    <dc:date>2025-03-11T20:49:37Z</dc:date>
    <item>
      <title>srcsets with hubl</title>
      <link>https://community.hubspot.com/t5/CMS-Development/srcsets-with-hubl/m-p/1120408#M42407</link>
      <description>&lt;P&gt;I am running into trouble getting the srcset function to operate in a custom module. the images aren't resizing as anticipated. I have them set to responsive and lazy loading in the settings. I have tried it with and without media queries and run into the same issue.&lt;BR /&gt;&lt;BR /&gt;I have asked a couple of people and they've told me they've had a tough time with the resize_image_url function too, so I'm hoping it's something simple that someone can just show me where I have made a mistake.&lt;BR /&gt;&lt;BR /&gt;Below is code and a snip of my field group so you have the relevant names for the fields. For some reason it jumps sizes at 521px but at no other barriers. Apologies, I've only been on the CMS about 8 days and I am trying to pass the best practices course practicum.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;section class="team_members"&amp;gt;&lt;BR /&gt;&amp;lt;div class="team_member"&amp;gt;&lt;BR /&gt;&lt;BR /&gt;{% for item in module.team %}&lt;/P&gt;&lt;P&gt;&amp;lt;div class="item"&amp;gt;&lt;BR /&gt;{% if item.image_field.src %}&lt;BR /&gt;{% set loadingAttr = item.image_field.loading != "disabled" ? 'loading="{{ item.image_field.loading }}"' : '' %}&lt;BR /&gt;&amp;lt;img srcset="{{ resize_image_url(item.image_field.src, 150) }} 150w,&lt;BR /&gt;{{ resize_image_url(item.image_field.src, 200) }} 200w,&lt;BR /&gt;{{ resize_image_url(item.image_field.src, 250) }} 250w,&lt;BR /&gt;{{ resize_image_url(item.image_field.src, 299) }} 299w"&lt;BR /&gt;sizes="(max-width: 374px) 150px,&lt;BR /&gt;(max-width: 767px) 200px,&lt;BR /&gt;(max-width: 1032px) 250px,&lt;BR /&gt;299px"&lt;BR /&gt;src="{{ item.image_field.src }}"&lt;BR /&gt;alt="{{ item.image_field.alt }}"&lt;BR /&gt;width="{{ item.image_field.width }}"&lt;BR /&gt;height="{{ item.image_field.height }}"&lt;BR /&gt;{{ loadingAttr }}&amp;gt;&lt;BR /&gt;{% endif %}&lt;BR /&gt;&amp;lt;div class="member_name"&amp;gt;&lt;BR /&gt;&lt;BR /&gt;{% inline_text field="text_field" value="{{ item.text_field }}" %}&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;div class="member_position"&amp;gt;&lt;BR /&gt;&lt;BR /&gt;{% inline_rich_text field="richtext_field" value="{{ item.richtext_field }}" %}&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;{% endfor %}&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/section&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.team_member{&lt;BR /&gt;display: flex;&lt;BR /&gt;flex-direction: row;&lt;BR /&gt;flex-wrap: wrap;&lt;BR /&gt;justify-content: space-evenly;&lt;BR /&gt;max-width: 100%;&lt;BR /&gt;}&lt;BR /&gt;.item{&lt;BR /&gt;flex: 0 0 25%;&lt;BR /&gt;text-align: center;&lt;BR /&gt;align-items: center;&lt;BR /&gt;justify-content: center;&lt;BR /&gt;color: #222222;&lt;BR /&gt;font-family: {{ module.style.font_field }};&lt;BR /&gt;flex-direction: column;&lt;BR /&gt;}&lt;BR /&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/83477"&gt;@media&lt;/a&gt; (max-width: 1032px) {&lt;BR /&gt;.item img{&lt;BR /&gt;max-width: 250px;&lt;BR /&gt;height: auto;&lt;BR /&gt;}&lt;BR /&gt;.item {&lt;BR /&gt;flex: 0 0 25%;&lt;BR /&gt;}&lt;BR /&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/83477"&gt;@media&lt;/a&gt; (max-width: 768px) {&lt;BR /&gt;.item img{&lt;BR /&gt;max-width: 200px;&lt;BR /&gt;height: auto;&lt;BR /&gt;}&lt;BR /&gt;.item {&lt;BR /&gt;flex: 0 0 33%;&lt;BR /&gt;}&lt;BR /&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/83477"&gt;@media&lt;/a&gt; (max-width: 374px) {&lt;BR /&gt;.item img{&lt;BR /&gt;max-width: 150px;&lt;BR /&gt;height: auto;&lt;BR /&gt;}&lt;BR /&gt;.item {&lt;BR /&gt;flex: 0 0 100%;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DChimenti20_0-1741635770517.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/140578i1B8C2FA9CCD500B0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DChimenti20_0-1741635770517.png" alt="DChimenti20_0-1741635770517.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 19:43:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/srcsets-with-hubl/m-p/1120408#M42407</guid>
      <dc:creator>DChimenti20</dc:creator>
      <dc:date>2025-03-10T19:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: srcsets with hubl</title>
      <link>https://community.hubspot.com/t5/CMS-Development/srcsets-with-hubl/m-p/1120934#M42413</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/907961"&gt;@DChimenti20&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Thanks for your question. It sounds like you're making great progress for only being 8 days into working with HubSpot.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you tried a simplified approach to your images? Something like:&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;img src="{{ resize_image_url(item.image_field.src, 250) }}"
     alt="{{ item.image_field.alt }}"
     loading="lazy"
     width="250"
     height="auto"&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;It's just one optimized image size, but it will display reliability and consistently across devices.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A few other best practices to keep in mind:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Keep original images under 2MB&lt;/LI&gt;
&lt;LI&gt;Always include alt text&lt;/LI&gt;
&lt;LI&gt;Specify width and height when possible&lt;/LI&gt;
&lt;LI&gt;Match CSS breakpoints with your image sizes&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Have fun building! — Jaycee&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 16:31:51 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/srcsets-with-hubl/m-p/1120934#M42413</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2025-03-11T16:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: srcsets with hubl</title>
      <link>https://community.hubspot.com/t5/CMS-Development/srcsets-with-hubl/m-p/1120936#M42414</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/907961"&gt;@DChimenti20&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks for providing the code. As we've chatted in the slack channel, you've solved this yourself &lt;span class="lia-unicode-emoji" title=":party_popper:"&gt;🎉&lt;/span&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;But a few optimization ideas:&lt;/P&gt;
&lt;P&gt;Add some variables on top of the module to add the ability to change it easier without digging through the whole module code (Very benefitial for big&amp;amp;complex modules) and also wrap the css in require_css or require_head statements. Doing so will push the style-tag to the &amp;lt;head&amp;gt;-tag of the page and optimize the rendering.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's how this could look:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% set breakpoints = {
 "sm": "374",
 "md": "768",
 "lg": "1024"
} %}
{% set image_sizes = {
 "sm": "150",
 "md": "200",
 "lg": "250"
} %}

&amp;lt;section class="team_members"&amp;gt;
    &amp;lt;div class="team_member"&amp;gt;

    {% for item in module.team %}
    &amp;lt;div class="item"&amp;gt;
        {% if item.image_field.src %}
        {% set loadingAttr = item.image_field.loading != "disabled" ? 'loading="{{ item.image_field.loading }}"' : '' %}
        
            &amp;lt;img 
                srcset="{{ resize_image_url(item.image_field.src, image_sizes.sm) }} {{ image_sizes.sm }}w,{{ resize_image_url(item.image_field.src, image_sizes.md) }} {{ image_sizes.md }}w,{{ resize_image_url(item.image_field.src, image_sizes.lg) }} {{ image_sizes.lg }}w"
                sizes="(max-width: {{ breakpoints.sm }}px) {{ image_sizes.sm }}px,(max-width: {{ breakpoints.md }}px) {{ image_sizes.md }}px,(max-width: {{ breakpoints.lg }}px) {{ image_sizes.lg }}px,{{ image_sizes.lg }}px" src="{{ item.image_field.src }}"
                alt="{{ item.image_field.alt }}"
                width="{{ item.image_field.width }}"
                height="{{ item.image_field.height }}"
                {{ loadingAttr }}
            &amp;gt;
        {% endif %}
        &amp;lt;div class="member_name"&amp;gt;
            {{ item.text_field }}
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="member_position"&amp;gt;
            {{ item.richtext_field }}
        &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
    {% endfor %}
    &amp;lt;/div&amp;gt;
&amp;lt;/section&amp;gt;

 

{% require_css %}
&amp;lt;style&amp;gt;
.team_member{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-evenly;
    max-width: 100%;
}

.item{
    flex: 0 0 25%;
    text-align: center;
    align-items: center;
    justify-content: center;
    color: #222222;
    font-family: {{ module.style.font_field }};
    flex-direction: column;
}

@media (max-width: {{breakpoints.lg}}px) {
    .item img{
        max-width: {{image_sizes.lg}}px;
        height: auto;
    }
    .item {
        flex: 0 0 25%;
    }
}

@media (max-width: {{breakpoints.md}}px) {
    .item img{
        max-width: {{image_sizes.md}}px;
        height: auto;
    }
    .item {
        flex: 0 0 33%;
    }
}
@media (max-width: {{breakpoints.sm}}px) {
    .item img{
        max-width: {{image_sizes.sm}}px;
        height: auto;
    }
    .item {
        flex: 0 0 100%;
    }
}
&amp;lt;/style&amp;gt;
{% end_require_css %}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 16:35:20 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/srcsets-with-hubl/m-p/1120936#M42414</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2025-03-11T16:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: srcsets with hubl</title>
      <link>https://community.hubspot.com/t5/CMS-Development/srcsets-with-hubl/m-p/1120937#M42415</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":raising_hands:"&gt;🙌&lt;/span&gt; As always, you are the best! — Jaycee&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 16:37:12 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/srcsets-with-hubl/m-p/1120937#M42415</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2025-03-11T16:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: srcsets with hubl</title>
      <link>https://community.hubspot.com/t5/CMS-Development/srcsets-with-hubl/m-p/1120949#M42416</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074"&gt;@Jaycee_Lewis&lt;/a&gt;!&lt;BR /&gt;&lt;BR /&gt;This would totally work, but in the course they want you to use the HubL code snippets for width and height attributes. Both yours an Anton's answers are great though.&lt;BR /&gt;&lt;BR /&gt;I know that you are actually affiliated with HubSpot. I only have 3 days left on my trial and the performance test for lighthouse keeps going above and below 90, which it needs to be above when they test it.&lt;BR /&gt;&lt;BR /&gt;Is there any way to get it grading of the practicums expedited so if it does drop below for some reason, I have time to resubmit before being locked out and losing my work (the reasons it has been dropping below and things like third-party scripts from what I have seen, so unsure if I can even do anything about that in a sandbox account)?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 16:59:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/srcsets-with-hubl/m-p/1120949#M42416</guid>
      <dc:creator>DChimenti20</dc:creator>
      <dc:date>2025-03-11T16:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: srcsets with hubl</title>
      <link>https://community.hubspot.com/t5/CMS-Development/srcsets-with-hubl/m-p/1120953#M42417</link>
      <description>&lt;P&gt;This is killer advice&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt;&amp;nbsp; . I appreciate you both taking the time to reply. Those 2 courses are great for being able to build out pretty much any module you would need, but there are so many nuances to structure, syntax, etc that come with experience that I really appreciate both of your help!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 17:02:40 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/srcsets-with-hubl/m-p/1120953#M42417</guid>
      <dc:creator>DChimenti20</dc:creator>
      <dc:date>2025-03-11T17:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: srcsets with hubl</title>
      <link>https://community.hubspot.com/t5/CMS-Development/srcsets-with-hubl/m-p/1121074#M42418</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/907961"&gt;@DChimenti20&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;don't worry about getting locked out of a dev portal.&amp;nbsp;&lt;BR /&gt;If you've created it via &amp;nbsp;&lt;A href="https://developers.hubspot.com/" target="_blank"&gt;https://developers.hubspot.com/&lt;/A&gt;&amp;nbsp;you got a so-called app-test account in this one you've - most likely - have created a CMS sandbox in which you're doing the practicum.&lt;/P&gt;
&lt;P&gt;If so, simply login into the app-test account and renew the trial. Trials are always for 90 days and none of your process will be lost if you somehow forget to renew it before the 90 days expire.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2025-03-11 um 18.00.55.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/140669i909CAF2DC5CCD03E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2025-03-11 um 18.00.55.png" alt="Bildschirmfoto 2025-03-11 um 18.00.55.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;There are a few things that will stop working, but once you renew the trial everything will work just fine.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pro tip: If you want to move things between portals, you can do it via Design-Manager. Simply right-click on a theme/folder and select "copy to different account".&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2025-03-11 um 21.45.42.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/140688i0E965AC112D97189/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2025-03-11 um 21.45.42.png" alt="Bildschirmfoto 2025-03-11 um 21.45.42.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you like to go the &lt;A href="https://developers.hubspot.com/docs/guides/cms/setup/getting-started-with-local-development" target="_blank" rel="noopener"&gt;CLI route&lt;/A&gt; - also possible. Simply authenticate both portals, fetch it from one to local and upload it to the other. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have fun&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 20:49:37 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/srcsets-with-hubl/m-p/1121074#M42418</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2025-03-11T20:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: srcsets with hubl</title>
      <link>https://community.hubspot.com/t5/CMS-Development/srcsets-with-hubl/m-p/1121078#M42419</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt;bro - you are always on point with the code snips, graphics and everything else to make it easy to understand. Thank you so much.&lt;BR /&gt;&lt;BR /&gt;I do have a Dev Sandbox Account, but on my CRM account it keeps telling me I have 3 days left, so I assumed that meant my CMS access would go away because that was how I got it in the first place.&lt;BR /&gt;&lt;BR /&gt;If I'll still have access to my Dev Sandbox either way, that's even better.&lt;BR /&gt;&lt;BR /&gt;Appreciate you!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 20:59:27 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/srcsets-with-hubl/m-p/1121078#M42419</guid>
      <dc:creator>DChimenti20</dc:creator>
      <dc:date>2025-03-11T20:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: srcsets with hubl</title>
      <link>https://community.hubspot.com/t5/CMS-Development/srcsets-with-hubl/m-p/1121204#M42420</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/907961"&gt;@DChimenti20&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your srcset is working, but the CSS max-width and flex-basis settings in your media queries are conflicting with the srcset behavior. The resize_image_url function is behaving unexpectedly due to fixed flex-basis and image max-width settings.&lt;BR /&gt;This is forcing the image to a maximum of 250px, even when the srcset is trying to load a smaller or larger image.&lt;BR /&gt;So the browser only sees the max-width and doesn’t respect the srcset breakpoints properly.&lt;BR /&gt;The width and height attributes in your &amp;lt;img&amp;gt; tag could be interfering with the srcset behavior.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;img
srcset="{{ resize_image_url(item.image_field.src, 150) }} 150w,
{{ resize_image_url(item.image_field.src, 200) }} 200w,
{{ resize_image_url(item.image_field.src, 250) }} 250w,
{{ resize_image_url(item.image_field.src, 299) }} 299w"
sizes="(max-width: 374px) 150px,
(max-width: 767px) 200px,
(max-width: 1032px) 250px,
299px"
src="{{ item.image_field.src }}"
alt="{{ item.image_field.alt }}"
width="{{ item.image_field.width }}" &amp;lt;!--  REMOVE THIS --&amp;gt;
height="{{ item.image_field.height }}" &amp;lt;!-- REMOVE THIS --&amp;gt;
{{ loadingAttr }}&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;By removing the width and height attributes from the image, you don't need to use a media query to set the size of the image to different devices.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this will help you out. Please mark it as &lt;STRONG&gt;Solution Accepted and upvote&lt;/STRONG&gt; to help another Community member.&lt;BR /&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 07:03:09 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/srcsets-with-hubl/m-p/1121204#M42420</guid>
      <dc:creator>GRajput</dc:creator>
      <dc:date>2025-03-12T07:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: srcsets with hubl</title>
      <link>https://community.hubspot.com/t5/CMS-Development/srcsets-with-hubl/m-p/1122594#M42443</link>
      <description>&lt;P&gt;So this is not what is happening. It's at 299px because there is an inline setting in HubL to the explicit width setting of 299px. This is reflected in the inspect tool. You are correct that the resize image url is doing what it is supposed to do, but where it is being overriden is incorrect. It is defaulting to the explicit width setting in the HubL code which is required to be included by the course.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 18:58:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/srcsets-with-hubl/m-p/1122594#M42443</guid>
      <dc:creator>DChimenti20</dc:creator>
      <dc:date>2025-03-14T18:58:52Z</dc:date>
    </item>
  </channel>
</rss>

