Post by nightwing » Mon May 18, 2020 5:46 am

Hi Team,

Good day, I hope you are all doing well. I have created a banner image, on desktops this shows really well, but on Mobile its smaller (very small). I have created a new banner image for Mobile devices, are you able to share your ideas on how I can use this banner image on mobile devices only?

I have seen this article but it doesn't have enough details to help: viewtopic.php?t=119433
OC Version: 3.0.3.2 Theme: Default

Active Member

Posts

Joined
Tue Nov 05, 2019 11:08 pm


Post by rjcalifornia » Mon May 18, 2020 12:29 pm

nightwing wrote:
Mon May 18, 2020 5:46 am
Hi Team,

Good day, I hope you are all doing well. I have created a banner image, on desktops this shows really well, but on Mobile its smaller (very small). I have created a new banner image for Mobile devices, are you able to share your ideas on how I can use this banner image on mobile devices only?

I have seen this article but it doesn't have enough details to help: viewtopic.php?t=119433
OC Version: 3.0.3.2 Theme: Default
Apply mediaquery css rules, so that you can use the banner when the screen is smaller than 700

https://developer.mozilla.org/en-US/doc ... ia_queries

Image
A2 Hosting features: Shared Turbo Boost, Managed Warp 1, Unmanaged Hyper 1, and Warp 2 Turbo


Active Member

Posts

Joined
Fri Sep 02, 2011 1:19 pm
Location - Worldwide

Post by paulfeakins » Mon May 18, 2020 7:09 pm

nightwing wrote:
Mon May 18, 2020 5:46 am
are you able to share your ideas on how I can use this banner image on mobile devices only?
Provide a link and you'll probably get some CSS to help.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by nightwing » Fri Jul 24, 2020 7:43 am

Apologies for the late response Paul, here is the website: https://www.jwbasics.com
paulfeakins wrote:
Mon May 18, 2020 7:09 pm
nightwing wrote:
Mon May 18, 2020 5:46 am
are you able to share your ideas on how I can use this banner image on mobile devices only?
Provide a link and you'll probably get some CSS to help.

Regards,
Nightwing
Access to my Free Extensions: https://www.opencart.com/index.php?rout ... =nightwing


Active Member

Posts

Joined
Tue Nov 05, 2019 11:08 pm


Post by letxobnav » Fri Jul 24, 2020 8:08 am

There is no way to change the images used in the banner using CSS media queries.
You will have to identify mobiles host-side or use srcsets which is a pain when used with banners/swipers
Last edited by letxobnav on Fri Jul 24, 2020 8:49 am, edited 1 time in total.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by IP_CAM » Fri Jul 24, 2020 8:21 am

Well, creating images with a 1920 px. width size is a plain master overkill, because
in a Browser, the max. OC Page Width Setting is around 1280 Pixel width. :laugh:
And the image is shrinked to 1134 pixel width by default... 8)

Image

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by nightwing » Fri Jul 24, 2020 8:39 pm

letxobnav noted.
letxobnav wrote:
Fri Jul 24, 2020 8:08 am
There is no way to change the images used in the banner using CSS media queries.
You will have to identify mobiles host-side or use srcsets which is a pain when used with banners/swipers

Regards,
Nightwing
Access to my Free Extensions: https://www.opencart.com/index.php?rout ... =nightwing


Active Member

Posts

Joined
Tue Nov 05, 2019 11:08 pm


Post by nightwing » Fri Jul 24, 2020 8:41 pm

IP_CAM :laugh: :laugh: :laugh: :laugh: :laugh: You are right - I will definitely update when I get some time as speed is a big part of my goal and even though its holding up real good, I know I can shave a bit more off when browsers don't have to be resizing the images.
IP_CAM wrote:
Fri Jul 24, 2020 8:21 am
Well, creating images with a 1920 px. width size is a plain master overkill, because
in a Browser, the max. OC Page Width Setting is around 1280 Pixel width. :laugh:
And the image is shrinked to 1134 pixel width by default... 8)

Image

Regards,
Nightwing
Access to my Free Extensions: https://www.opencart.com/index.php?rout ... =nightwing


Active Member

Posts

Joined
Tue Nov 05, 2019 11:08 pm


Post by IP_CAM » Fri Jul 24, 2020 11:50 pm

Well, it's not even required to add some Code, to add a smaller Banner in
Mobile View, if you compress banners in a decent way, the one's I use also
have a 1'274px × 544px image size, with a data Volume of 49.9 KB , and Google
does not 'punish me' dramatically, because of that.
Ernie
---
Image

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by nightwing » Sat Jul 25, 2020 2:04 am

Wow this is some serious performance! ;D ;D ;D
IP_CAM wrote:
Fri Jul 24, 2020 11:50 pm
Well, it's not even required to add some Code, to add a smaller Banner in
Mobile View, if you compress banners in a decent way, the one's I use also
have a 1'274px × 544px image size, with a data Volume of 49.9 KB , and Google
does not 'punish me' dramatically, because of that.
Ernie
---
Image

Regards,
Nightwing
Access to my Free Extensions: https://www.opencart.com/index.php?rout ... =nightwing


Active Member

Posts

Joined
Tue Nov 05, 2019 11:08 pm


Post by IP_CAM » Sat Jul 25, 2020 2:44 am

Wow this is some serious performance
took me 6 Years and a few months, to get there ... :laugh:

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by nightwing » Mon Jul 27, 2020 7:39 pm

Its strange that gtmetrix and google page speed insights are so different. My website has two far apart readings on both - I will pm you and we can continue over email.

Thanks
IP_CAM wrote:
Sat Jul 25, 2020 2:44 am
Wow this is some serious performance
took me 6 Years and a few months, to get there ... :laugh:

Regards,
Nightwing
Access to my Free Extensions: https://www.opencart.com/index.php?rout ... =nightwing


Active Member

Posts

Joined
Tue Nov 05, 2019 11:08 pm

Who is online

Users browsing this forum: No registered users and 389 guests