Feature: Do not add to big sized Image Setting #6726
Comments
All this exists and is called "maximum image width" and "maximum image height". |
Sorry, thats not correct. I made the following Config for better explanation:
So I do not want this file to be uploaded. Because the pixel size is to big. |
That's my config: $GLOBALS['TL_CONFIG']['gdMaxImgWidth'] = 2000;
$GLOBALS['TL_CONFIG']['gdMaxImgHeight'] = 2000;
$GLOBALS['TL_CONFIG']['imageWidth'] = 2000;
$GLOBALS['TL_CONFIG']['imageHeight'] = 2000;
$GLOBALS['TL_CONFIG']['maxImageWidth'] = 2000;
$GLOBALS['TL_CONFIG']['maxImageHeight'] = 2000; |
Sorry, my bad. I figured the uploaded images were declined if they exceed the given image dimensions and it is not possible to resize them because they also exceed the GDlib limits. I almost consider this a bug. @contao/workgroup-core @tristanlins @discordier @JanoschSkuplik What do you think? |
Difficult… |
As I do not use the internal file upload I never ran into this kind of "bug" but I have to admit, it feels wrong being able to upload an image but not using it later on. IMO the images should already be in some proper "web size" and only minor adjustments and cropping should be applied by the CMS, hence the reason for having cropping etc. available in there at all. Therefore I vote for declining a file that exceeds the configured values. |
This would prevent showing the originals in a lightbox or for download purposes as well. |
@fjacobi the "originals" are currently being downscaled when being uploaded via the file management in Contao, aren't they? So I do not understand what exactly your point is? |
@discordier I raised those limits to 8000x8000, so the user can upload them, but they can't be used for resize or anything else (as hinted in the message). But they can still be downloaded or directly served to visitors. |
Yes, I agree with this.
|
That's a strong argument to which I have to agree. I'll close the ticket then. @Zeromax You might be able to accomplish what you want using the "postUpload" hook. |
Sorry but you missed the point.
I don't understand what's the problem. I want to have a checkbox in the system settings which is optional and I can enable it to not upload images which are bigger than the GD-Lib Size. So the current behaviour stays the same as it is. You can upload as big images as you need. |
@Zeromax My comment was directly related to @discordier statement above mine. |
In a current project I have the problem that the user is uploading Image files wich pixel size is taller than the GDLib size. They are added to the Filesystem unresized.
I cannot increase the GDLib size because of server limitations. So I am asking to add the Following:
false
by default, so the current behavior is still there that images which are to tall still be added to the file treeOnly allowed YxZpx size your file has YxZpx
The text was updated successfully, but these errors were encountered: