Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] webp support in templates #33087

Merged
merged 2 commits into from
Apr 24, 2021
Merged

Conversation

brianteeman
Copy link
Contributor

#31048 provided the library level support for webp images

This PR adds webp to the list of allowed image types for com_templates. It does not have an update sql as that would change user data.

This isnt really anything to test here accept codestyle as using webp images in templates was the test for the libray update so we know it works

adding support to the media manager will be in its own pr (its a bit more complex)

joomla#31048 provided the library level support for webp images

This PR adds webp to the list of allowed image types for com_templates. It does not have an update sql as that would change user data.

This isnt really anything to test here accept codestyle as using webp images in templates was the test for the libray update so we know it works
@Quy
Copy link
Contributor

Quy commented Apr 14, 2021

I have tested this item ✅ successfully on 7f4cfaa


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

@particthistle
Copy link
Member

I have tested this item ✅ successfully on 7f4cfaa

Code style change. All change really does is allow webp images to be used in com_templates.


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

@Quy
Copy link
Contributor

Quy commented Apr 17, 2021

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Apr 17, 2021
@Quy Quy added this to the Joomla 4.0 milestone Apr 17, 2021
@SharkyKZ
Copy link
Contributor

I have tested this item 🔴 unsuccessfully on 7f4cfaa

webp images are saved as jpgs, transparency is lost.


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

@brianteeman
Copy link
Contributor Author

@SharkyKZ good spot - fixed it (I hope please retest)

@Quy please remove RTC for now

@brianteeman
Copy link
Contributor Author

To test the resize and cropping of a webp image. Upload an image and resize and/or crop. Then download the image and open in a text editor. If it is still a webp image you will see something like RIFF�"� WEBPVP8 at the beginning. If it has been saved incorrectly as a jpeg then it will have <CREATOR: gd-jpeg v1.0 (using IJG JPEG v90), quality = 100

@joomla-cms-bot joomla-cms-bot removed this from the Joomla 4.0 milestone Apr 17, 2021
@Quy Quy removed the RTC This Pull Request is Ready To Commit label Apr 17, 2021
Copy link
Member

@particthistle particthistle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing the actual process this time 🤦🏻‍♂️

The change only impacts the default. To actually test if all this works, I've had to go to System > Site Templates > Options and add wepb (and png) to the list.

I note that the default is missing PNG.

@particthistle
Copy link
Member

In testing, I also found an issue if the extension of the file is upper case.

sample.PNG would upload, but then not be visible in the file tree. Adding GIF,JPG,JPEG,PNG,WEBP to the list of allowed extensions then allowed the uppercase extension to be viewed.

Is it worth adding that now, or is this something to be raised as a separate issue to fix in the uploader so that it makes the extensions lowercase when the files are uploaded?

@brianteeman
Copy link
Contributor Author

Beyond the scope of this PR - please create a separate issue

@particthistle
Copy link
Member

I have tested this item ✅ successfully on e64306b

Addition of png and webp extensions allows file types to be uploaded.
(To test on existing build check System > Site Templates > Options to add png,webp to the image extensions list, as it won't apply the default automatically)

Resizing and Cropping a webp image saves the image as a webp image correctly.


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

@anibalsanchez
Copy link
Contributor

I have tested this item ✅ successfully on e64306b

Test OK


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

@Quy
Copy link
Contributor

Quy commented Apr 23, 2021

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Apr 23, 2021
@rdeutz rdeutz merged commit cb26f9e into joomla:4.0-dev Apr 24, 2021
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Apr 24, 2021
@rdeutz rdeutz added this to the Joomla 4.0 milestone Apr 24, 2021
@brianteeman
Copy link
Contributor Author

Thanks

@brianteeman brianteeman deleted the webptemplate branch April 24, 2021 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants