[buddypress-trac] [BuddyPress Trac] #7660: .webp files not properly handled

buddypress-trac noreply at wordpress.org
Thu Jan 18 08:02:39 UTC 2018


#7660: .webp files not properly handled
--------------------------+-----------------------------
 Reporter:  pscolv        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  2.9.2
 Severity:  major         |   Keywords:
--------------------------+-----------------------------
 As of today, .webp picture format tends to be widely used in order to
 accelerate page download speed.

 There are plugins, like ShortPixel, which automatically process the media
 library and generate copies of the images there, in .webp format, such
 that they can be used on supported browsers.

 This works fine with wordpress standard image url retrieve functions,
 which output the right version depending on whether the browser supports
 it.

 However in the case of Buddypress, I noticed that .webp images are
 retrieved, even if they are not supported by the browser (ex : Firefox),
 which leads to broken images on the website.

 The bp functions affected by this issue are (at least) :
 * bp_attachments_get_attachment => chooses the first image in the folder
 which corresponds to the requested type (eg cover-image), and apparently
 doesn't take the format into account.
 * bp_displayed_user_avatar => also presents the issue

 One way of solving this would be to use the <picture> html tag, which
 proposes different image sources to the browser, for it to choose the most
 appropriate, or align with the wordpress approach which I didn't study in
 detail...

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7660>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list