? ? ? Pending

User tests: Successful: Unsuccessful:

avatar SharkyKZ
SharkyKZ
11 Oct 2020

Summary of Changes

Adds WebP support to image library.

Testing Instructions

Upload a webp image to template directory.
Go to com_templates.
In configuration add webp to Valid Image Formats field.
Go to template files and try to edit the image.

Actual result BEFORE applying this Pull Request

Error:

Attempting to load an image of unsupported type image/webp

Expected result AFTER applying this Pull Request

Image can be opened and edited (but is saved in wrong format).

Documentation Changes Required

IDK.

avatar SharkyKZ SharkyKZ - open - 11 Oct 2020
avatar SharkyKZ SharkyKZ - change - 11 Oct 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 11 Oct 2020
Category Libraries Unit Tests
avatar SharkyKZ SharkyKZ - change - 11 Oct 2020
Labels Added: ? ?
avatar richard67
richard67 - comment - 11 Oct 2020

Expected result AFTER applying this Pull Request

Image can be opened and edited (but is saved in wrong format).

@SharkyKZ Is there something we can do to solve the "is saved in wrong format"? If so, you want to do it with this PR, or want to make a new one, or not want to do it at all?

avatar SharkyKZ
SharkyKZ - comment - 11 Oct 2020

This is fixed in staging with #30977. Once it reaches 4.0-dev, we'll just need to add a case for WebP.

avatar richard67
richard67 - comment - 11 Oct 2020

@SharkyKZ I see. With "format" you meant the size, not the image type, right?

avatar SharkyKZ
SharkyKZ - comment - 11 Oct 2020

No. All images are saved as JPEGs.

avatar richard67
richard67 - comment - 11 Oct 2020

Ah, ok.

avatar richard67
richard67 - comment - 11 Oct 2020

At least JPEG and not BMP ;-)

avatar richard67 richard67 - test_item - 11 Oct 2020 - Tested successfully
avatar richard67
richard67 - comment - 11 Oct 2020

I have tested this item successfully on 0fabc63


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31048.

avatar dgrammatiko
dgrammatiko - comment - 11 Oct 2020

@SharkyKZ can you check if GD supports AVIF files and if so enable them as well?
Info: https://jakearchibald.com/2020/avif-has-landed/

avatar SharkyKZ
SharkyKZ - comment - 11 Oct 2020

I don't think it does.

avatar jwaisner jwaisner - test_item - 12 Oct 2020 - Tested successfully
avatar jwaisner
jwaisner - comment - 12 Oct 2020

I have tested this item successfully on 0fabc63


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31048.

avatar jwaisner jwaisner - change - 12 Oct 2020
Status Pending Ready to Commit
avatar jwaisner
jwaisner - comment - 12 Oct 2020

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31048.

avatar SharkyKZ SharkyKZ - change - 12 Oct 2020
Labels Added: ?
Removed: ?
avatar SharkyKZ SharkyKZ - change - 12 Oct 2020
Labels Added: ?
avatar richard67 richard67 - alter_testresult - 12 Oct 2020 - richard67: Tested successfully
avatar richard67 richard67 - alter_testresult - 12 Oct 2020 - jwaisner: Tested successfully
avatar richard67
richard67 - comment - 12 Oct 2020

Previous tests are still valid since changes after those were only in code style (indent) and comment.

avatar jiweigert
jiweigert - comment - 12 Oct 2020

For the question if GD support AVIF format.

As the underlying libgd don't support it, GD does not either.
There is an open issue at: libgd/libgd#557

Basically, they wait for a plugin that that they can link to and do the work.. or someone who implement avif support.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31048.

avatar Quy
Quy - comment - 12 Oct 2020

Should the installation sql/xml files be updated to include webp for Valid Image Formats?

avatar N6REJ
N6REJ - comment - 12 Oct 2020

how about adding webm @ the same time?

avatar SharkyKZ
SharkyKZ - comment - 12 Oct 2020

@Quy Not going to do this here. You can make a separate PR. Otherwise I'll wait for #30977 to be merged into 4.0 first.

@N6REJ WebM is not an image format.

avatar rdeutz rdeutz - change - 16 Oct 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-10-16 11:07:47
Closed_By rdeutz
Labels Added: ?
Removed: ?
avatar rdeutz rdeutz - close - 16 Oct 2020
avatar rdeutz rdeutz - merge - 16 Oct 2020
avatar piotr-cz
piotr-cz - comment - 4 Nov 2020

What are your opinions about backporting this into the 3.x branch?

avatar morsssss
morsssss - comment - 15 Jan 2021

Hey, I'm excited to see this interest in AVIF from Joomla!

I'm working on implementing libgd/libgd#557 right now...

avatar brianteeman
brianteeman - comment - 15 Jan 2021

@morsssss Thanks for popping in Ben. We have another open issue about AVIF (see #30666) it would be great if you could keep us updated with your progress over there.

avatar morsssss
morsssss - comment - 16 Jan 2021

Thanks for letting me know! I can do that.

avatar morsssss
morsssss - comment - 22 Feb 2021

Just letting you know that this PR is almost out of review. I expect it to be merged soon!

Add a Comment

Login with GitHub to post a comment