Shopify themes, liquid, logos, and UX
I have a problem with image, the size is : 480x960
I put an image in a page and then I configure the size by code so it can fit perfectly the good dimension.
But the image is stretch in mobile view.
I don't know if it's because the image is long, maybe long images is not a good thing.
In desktop view, it's okay but in mobile view the image is stretched.
I'm confused about image dimension in shopify.
The url of the stretched image (in mobile view) :
Thank you and sorry for my bad english !
Solved! Go to the solution
This is an accepted solution.
Hello @Aleksy,
1. Go to Online Store->Theme->Edit code
2. Asset->theme.scss->paste below code at bottom of file
@media only screen and (max-width: 768px) {
img, iframe {
object-fit: cover !important;
}
}
Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: wahabahmadghori@gmail.com
This is an accepted solution.
Hello @Aleksy,
Replace previous with this
@media only screen and (max-width: 768px) {
img, iframe {
object-fit: contain !important;
height: auto !important;
}
}
This is an accepted solution.
Hello @Aleksy,
1. Go to Online Store->Theme->Edit code
2. Asset->theme.scss->paste below code at bottom of file
@media only screen and (max-width: 768px) {
img, iframe {
object-fit: cover !important;
}
}
Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: wahabahmadghori@gmail.com
thank you a lot thats working !
But now the image is cut off like that
This is an accepted solution.
Hello @Aleksy,
Replace previous with this
@media only screen and (max-width: 768px) {
img, iframe {
object-fit: contain !important;
height: auto !important;
}
}
that's perfect thank you
This saved me! thank you so much for this information.
I appreciate you:-)
Hello there, could you help me with a similar issue. instead of an enlarge picture my picture is smaller!
User | RANK |
---|---|
73 | |
67 | |
59 | |
56 | |
42 |
As a business owner, have you ever wondered when your customer's first impression of yo...
By Skye Jun 6, 2023We're excited to announce improvements to the threaded messaging experience in our communi...
By TyW May 31, 2023Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...
By Jacqui May 30, 2023