Bug #16120
closedMax. filesize for images in 'text with image' and 'images only' CEs has too small default value
0%
Description
Upload of images larger than 1 MB in 'text with image' and 'images only' content elements is not possible, because the filesize limit (1MB) is hardcoded.
Error message:
1: Filesize (1.3 M) of file 'foo.jpg' exceeds limit (1.0 M). (tt_content:3:image)
May I suggest to make this at least configurable via the install tool or TS?
Rupi did set the image filesize limit for tt_news to 10MB, which should be more than enough for the next few years ;)
Ok, why should anyone want to use images larger than 1MB in those content elements? For example we are using fileadmin/ as a repository for images which can be used both by web or by print. For print the images need to have the highest quality available, and that is most times >1MB.
When the images are used in our web site, ImageMagick scales them down to an acceptable file size, but the great benefit is that our editors can download the exact same images they used for online articles when they want to use the articles in print.
(issue imported from #M3412)
Files
Updated by Robert Markula about 18 years ago
Does anybody know where exactly this is hardcoded?
Updated by Andreas Wolf about 18 years ago
Have a look at typo3/sysext/cms/tbl_tt_content.php and search for the column-array "image". There "max_size" is set to 1000. Raising it to 10000 should give you about 10 MB (or use 10486 to have 10 "real" MB).
Updated by Robert Markula about 18 years ago
Thanks Andreas! Seems like a simple change.
Is it possible to get this changed in stock Typo3? Or - better - make it configurable?
Updated by Marc Bastian Heinrichs about 18 years ago
It is configurable!
t3lib_div::loadTCA('tt_content');
$TCA['tt_content']['columns']['image']['config']['max_size'] = 10000;
in an ext_tables.php for example
Updated by Robert Markula about 18 years ago
You are right, but for the reasons mentioned in this bug report I suggest that either it should be set to 10 MB by default and/or it should be made configurable within Typo3 (like via page or user TS or TS setup) or via the install tool (like attaching to the parameter [BE][maxFileSize]).
Updated by Robert Markula almost 18 years ago
Well it seems I'm not the only one missing this 'feature'. Today Patrick Gaumond published his extension 'images_10mb' which does exactly what this bug is about.
Why not raising the filesize limit in the core by default - or at least making it configurable? We live in the broadband age and it won't hurt anyone.
Updated by Martin Kutschker almost 18 years ago
I think it is possible in RC1 to set some of the TCA settings now. The filesize should be one of them.
Please have a look at the latest check ins (and browse the Core list) for more info.
Updated by Oliver Hader almost 18 years ago
The 4.1RC1 feature Masi mentioned could be used by setting TSconfig like this:
TCEFORM.tt_content.image.config.max_size = 5120
This will override the predefined value in $TCA['tt_content']['columns']['image']['config']['max_size']
(see http://wiki.typo3.org/index.php/Pending_Documentation)
Updated by Patrick Gaumond almost 18 years ago
For people using TYPO3 version smaller than 4.1, my 2 lines extension is available on TER and could fix your problem:
Key: images_10mb
http://typo3.org/extensions/repository/view/images_10mb/0.1.1/
Thanks to Marc Bastian Heinrichs for the code!