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;
}
}
Hello there, could you help me with a similar issue. instead of an enlarge picture my picture is smaller!
This saved me! thank you so much for this information.
I appreciate you:-)
User | RANK |
---|---|
234 | |
154 | |
58 | |
55 | |
47 |
Thanks to all who participated in our AMA with 2H Media on planning your 2023 marketing bu...
By Jacqui Mar 30, 2023Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023