# Custom coding needed to optimize pagespeed mobile score

**URL:** <https://community.hubspot.com/t/custom-coding-needed-to-optimize-pagespeed-mobile-score/91903>\
**Category:** CMS Development\
**Tags:** html\
**Created:** [October 16, 2023, 4:02pm UTC](https://community.hubspot.com/t/custom-coding-needed-to-optimize-pagespeed-mobile-score/91903 "2023-10-16T16:02:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![CGordon40](https://avatars.discourse-cdn.com/v4/letter/c/4bbf92/32.png) [@CGordon40](https://community.hubspot.com/u/CGordon40)\
**Post date:** [October 16, 2023, 4:02pm UTC](https://community.hubspot.com/t/custom-coding-needed-to-optimize-pagespeed-mobile-score/91903/1 "2023-10-16T16:02:55Z")

</div>

Hi! I was recommended to seek advice here after finishing a customer support call with Hubspot.

I was told I need custom coding to resolve the following issue:

When I put my webpage through pagespeed, the desktop score is near perfect. However, my mobile score is lower than I would like it to be. I have all my mobile images sized correctly, however, for some reason, the pagespeed report is showing the hero desktop image as the page’s largest issue, even though the visibility for this image is toggled off mobile.

Does anyone know what type of code I need to block the mobile page from acknowledging the hidden desktop hero image? I’m not sure why it is detecting it in the first place.

Thanks

---

<div class="post-metadata">

**Author:** ![amotion](https://avatars.discourse-cdn.com/v4/letter/a/e9c0ed/32.png) [@amotion](https://community.hubspot.com/u/amotion)\
**Post date:** [October 16, 2023, 6:16pm UTC](https://community.hubspot.com/t/custom-coding-needed-to-optimize-pagespeed-mobile-score/91903/2 "2023-10-16T18:16:04Z")

</div>

your website wordpress ? tell me i have one code add page in html your website page responsive in mobile also. i have add my DYOWA WhatsApp website this website responsive.

---

<div class="post-metadata">

**Author:** ![CGordon40](https://avatars.discourse-cdn.com/v4/letter/c/4bbf92/32.png) [@CGordon40](https://community.hubspot.com/u/CGordon40)\
**Post date:** [October 16, 2023, 6:25pm UTC](https://community.hubspot.com/t/custom-coding-needed-to-optimize-pagespeed-mobile-score/91903/3 "2023-10-16T18:25:05Z")

</div>

My website is with hubspot

---

<div class="post-metadata">

**Author:** ![jnix284](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jnix284/32/29_2.png) [@jnix284](https://community.hubspot.com/u/jnix284)\
**Post date:** [October 18, 2023, 1:44pm UTC](https://community.hubspot.com/t/custom-coding-needed-to-optimize-pagespeed-mobile-score/91903/4 "2023-10-18T13:44:06Z")

</div>

Hi @CGordon40 this will vary greatly depending on how your website is built within HubSpot. Are you using the old coded templates or is it built with a theme?

Can you share a link to your website?
