Keyword

switch image size served based on device

  • Petar Elez
  • Petar Elez's Avatar Topic Author
  • Offline
  • Junior Member
More
8 years 1 week ago #157952 by Petar Elez
switch image size served based on device was created by Petar Elez
Anyone know if there is a way to switch image size used based on device detected or media query?

If yes, suggestions how to set this up?

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 1 week ago #157970 by Krikor Boghossian
Replied by Krikor Boghossian on topic switch image size served based on device
Hello,

This can be done on your overrides.
You can use the srcset method which has a really good compatibility with modern browsers.

Here is a starting point
github.com/kricore/Advanced-templating-with-K2/blob/master/_inc/cheatsheet.php#L126-L145

More on overrides can be found here:
getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
8 years 1 week ago #157989 by politicaldoubts
Replied by politicaldoubts on topic switch image size served based on device
Thanks a lot! Worked fine!

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 1 week ago #157992 by Krikor Boghossian
Replied by Krikor Boghossian on topic switch image size served based on device
You 're welcome :)

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum