schmitzal / tinyimg Goto Github PK
View Code? Open in Web Editor NEWTYPO3-Extension which compresses images (png & jpg) uploaded in the backend with the tinypng API
License: GNU General Public License v3.0
TYPO3-Extension which compresses images (png & jpg) uploaded in the backend with the tinypng API
License: GNU General Public License v3.0
Add a debugging mode so tinyimg does not run during development and does not use the limited image compressions (500 per month for free).
Example usage:
[applicationContext = Development]
plugin.tx_tinyimg.settings.debug = 1
[global]
Hi Alessandro,
great extension, thanks! I have a question/problem to the image size process in combination with fluid-styled-responsive-images. I create an png image, upload it to the typo3 backend. File size original 37 kb, with your extension reduced to 8 kb - great. Now I put this image with the CE text & media on my website. To serve for different devices a proper size of the image, I have also installed Alex extension. Now the problem is, when the png file gets processed, the file size is getting a lot bigger... like Photoshop does as standard. Any ideas how to solve this problem?
cheers, Florian
Check if the API also only allows compression of images with a max file size of 5 MB.
Add an option to the command to allow the user to calculate the estimated costs of compressing all images.
Hi Alessandro, I've installed your extension via EM, include the static TS-template (root), insert the API-key at the settings via Extension Manager. Your installation and configuration hints are very clear. I'm using TYPO3 8.7.22
and PHP 7.1
on a managed Server (1&1).
Unfortunately, I still have an error uploading a file. The upload finishes with an Internal Server Error:
But if I reload, I'll can see the file is there, but not compressed.
The same picture should be minimized to 240kb.
I've read all the closed issues, but I think I'm the first, who have this problems?!
Is the fault with me or my configuration? Can you help me?
Thanks,
Stefan
Check for possibility to add custom Assets and HTML to FileList without overriding the whole Template.
For some reason, if you install the tinyimg ext via composer, you run in an error while trying to upload a file. It turned out, that if you have the typo3cms install:generatepackagestates
in your composer.json scripts, but not the typo3cms database:updateschema
the ext is installed but the database isn't up to date.
It would be helpful if this is mentioned in the install documentation.
After digging into your extension i recognized that only the original images are minified but not the processed ones. So I did some testing with processed images.
The file was processed with the f:image
ViewHelper to create a variant with a maximum width of 800 pixels.
First the test without any minification
File | Size | Comment |
---|---|---|
Original | 3.98MB | |
Processed | 120KB | |
Processed minified | 104.5KB | Manually minified via Webinterface |
After that a test with the extension installed and the minified source file
File | Size | Comment |
---|---|---|
Original | 1.36MB | |
Processed | 114KB | |
Processed minified | 104.2KB | Manually minified via Webinterface |
As you can see the file processed by TYPO3 is only slightly smaller with/without a minified source file. But minifiying the processed file saves around 10% in my testcase. The difference will be bigger with larger variants.
From my point of view it would make sense to have (at least) an option to enable minifying of processed files. What do you think?
I guess the correct way to do this would be the postFileProcess
signal in \TYPO3\CMS\Core\Resource\Service\FileService
on line 94
.
I don't know if there is a chance of TYPO3 10 compatibility? Are there any plans of updating the extension?
Thanks a lot for this great extension guys,
i found a little compatibility bug TYPO3\CMS\Core\Resource\Event\AfterFileReplacedEvent dosen't exists < TYPO 10
Ich bekomme beim ausführen diese Fehlermeldung:
Die Ausführung von Task "Extbase-CommandController-Task (extbase)" ist fehlgeschlagen mit folgender Meldung: PHP Warning: explode() expects parameter 2 to be string, object given in /html/typo3/typo3_src-8.7.19/typo3/sysext/core/Classes/Utility/GeneralUtility.php line 1302
Hi,
I figured out a problem, when customers using mp4 files and uploading them to folders in the BE. tinyimg is throwing an error of unsupporting file. How to prevent this? Thx.
Florian
[ TypeError ] Return value of "Schmitzal\Tinyimg\Command\CompressImagesCommand::execute()" must be of the type int, "null" returned.
Maybe by adding an extra overlay when a file is uploaded? Any ideas are welcome.
Hello, thanks for the great extension.
I have some questions - is this ext can run with image_autoresize?
And another question - what about files that are resized by TYPO3 - this images are also compressed by tinyimg?
Hello Team,
I am trying to use this extension in my website and I am facing a strange issue when the image uploaded. It returns "Internal Server Error".
When I checked the system log, I can see that there is an error there. Please see the screen below.
I hope this will be the issue. Somebody can give me a hint how can I solve this problem? I am using the latest version of the extension.
Thank you.
Hi Alex,
I'm one of the developers behind tinypng.com. We have been trying to answer your questions that you sent but our message keeps bouncing back. Could you provide me with an alternative email address either here or send us another message at [email protected]?
Notify the editor on upload when the compression limit is reached and don't ouput file upload as failed.
Since version 1.5.1 tinyimg shows "Tinyimg saved you about 0% of your file size!" for every image on TYPO3 8.7.33 (eLTS) after the compression.
If I open an image I see that the file size has changed and the compression did in fact work, but the information shown is wrong. Even the TYPO3 filelist module displays the original file size, not the compressed size.
With Version 1.5.3 the return value of the execute-Method was changed to a class constant
return Command::SUCCESS;
This will use the class \Symfony\Component\Console\Command\Command
which does not have such a constant. So the Command will produce an error. The TYPO3-Dependency in the composer.json ist set to ^10.4
Hey!
Just wanted to ask if you plan to support TYPO3 v12 and if yes if you got a time plan for that?
Thanks a lot,
Ulli
Hi,
It would be great to add a possibility to trigger scale for all existing images in selected filemount(s). Such a feature can be implemented as Scheduler Task.
Main use case for it: website is already running with tons of images, which need to be compressed.
Please make check of existence of the constant for earlier versions of symfony/command:
Hi, just curious where and how to install the Tinify Php Lib manually?
Cant use composer on this server! Where exactly to copy the php files?
Using the latest Typo3 extension for 10.4..
Thx
chriskapeller
A backendmodule where images are listed with a failed- or successtate. A label or state if the script works would be helpful and a nice to have feature would be to show how many percents have been saved with the compression.
TYPO3 Extension Package "schmitzal/tinyimg", does not define extension key in composer.json.
Specifying the extension key will be mandatory in future versions of TYPO3 (see: https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ExtensionArchitecture/ComposerJson/Index.html#extra)
We tried to update our web from TYPO3 v10.4.34 to v11.5.22. During the update phase we recognized that your extension tinyimg v1.6.1 is causing this message during the backend check "Check TCA Migrations": "The 'sys_file' TCA configuration 'showRecordFieldList' inside the section 'interface' is not evaluated anymore and should therefore be removed."
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.