[wp-trac] [WordPress Trac] #36962: Responsive images WONT work in mobiles
WordPress Trac
noreply at wordpress.org
Sat May 28 01:36:01 UTC 2016
#36962: Responsive images WONT work in mobiles
--------------------------+-------------------------
Reporter: gabu69 | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Media | Version: 4.5.2
Severity: normal | Resolution: worksforme
Keywords: | Focuses:
--------------------------+-------------------------
Changes (by joemcgill):
* status: new => closed
* resolution: => worksforme
* milestone: Awaiting Review =>
Comment:
Hi @gabu69,
Welcome to Trac! It looks like everything is working as expected when I
look at your test example. One thing I noticed that may be of help is that
you only have three sources available, 400px, 730px, and your full size
2048px version. You may want to add at least one additional size that is
larger (maybe something like 1000px). Currently, if a mobile browser has a
pixel density of 2x and the viewport width is 400px wide, it's going to
look for a source that's at least 800px wide. Since you don't have any
sizes between 730px and 2048px, many times it will choose the 2048px size
instead of scaling up a smaller image.
To add additional image sizes to your theme you can use the
`add_image_size()` function
([https://developer.wordpress.org/reference/functions/add_image_size/ see
documentation] in your functions.php file.
Since WordPress is working as expected, I'm going to go ahead and close
this ticket as a ''worksforme'', but feel free to continue the
conversation if you have any questions.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36962#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list