How can Imagesize be restricted while using/uploading sugar's ImageField? My guess is there should be any property of field. I want that user upload maximum 2MB image.
Add the POST_MAX_FILE size form field to the form and it should apply that restriction...
http://php.net/manual/en/features.file-upload.post-method.php
There is a configuration setting upload_maxsize in config.php. But this limit will be applied to all uploads and not just for the image field.
Related
I created in TYPO3 extension DCE an image field that allows to input an image with caption and title field in the backend. But I couldn't access the value of these fields to input in the alt-tag in source. No values are shown by f:debug, how can I access these values and output?
The fastest solution would be having a look into the Class Reference of TYPO3\CMS\Core\Resource\FileReference. There are many getters for the properties. They access (and are allowed to access) the mergedProperties-array. In your special case getDescription() is, what you are looking for.
So for getting description a simple {field.imageDesktop.{i}.description} should work (if field.imageDesktop.{i} is a FileReference).
I have used TYPO3 Mask to make an element with a background image. But it looks like that the image is not saved. It is not shown in the frontend.
Although you use mask you need to define your own rendering. And that depends on the fields you used in the mask definition (using existing fields and creating new fields).
And the names may change when you exported the mask definition.
And you need to create the additional fields in the database (clear cache and do a database compare, or deactive/reactive the extension).
Then you can look for the field with a <f:debug title="inside my CE">{_all}</f:debug> in the rendering template.
Sorry, I'm not familiar with typo3...
I have a typo3 6.2.14 installation (cannot be updated due to needed extensions) where the constants for click-enlarged images had to be adjusted.
I've cleared the cache, but nothing changed. What do I need to do?
plugin.tx_kjimagelightbox2.lightBoxMaxW = 1600 //(was 800)
plugin.tx_kjimagelightbox2.lightBoxMaxH = 1200 //(was 600)
Nothing changed. Thanks
Wow,
that's some very old TYPO3 with loads of security issues and outdatet PHP as well! Consider forking the extensions and make them work in at least 8.7.
Back to your question.
Where did you set this? Do you use files or do you just edit in the backend? You might need to gather some more information about the order your extensions are beeing loaded.
You might set your values too early and the extensions' defaults overwrite your "changes" (which have actually been declarations)
Maybae you could provide some more information of your setup.
the problem is:
the maximum sizes for images can be influenced in multiple places with multiple values.
Even if you have set the correct value, this value may be overwritten later with the smaller values.
1st:
are your original images at least big enough? normaly there is no enlargement of images.
2nd:
inspect the values in the TSOB. Are your values active in the setup?
your changes in constants may be overwritten in the setup easily and only setup is relevant for rendering.
3rd:
there are global maximum values about image rescaling in content elements. maybe these also influence your image rendering in that plugin
I am struggling with typo3. I want to add a default id to a particular image uploaded in a section by user.
My backend layout create a section with colPos = 1.
In this section user can upload one image, which will have id of
bg-img
I have cleared default rendering of image by this code:
tt_content.image.20.1.layout.default.element = <img src="###SRC###" ###ALTPARAMS###>
My template code is like this:
page.10.subparts {
HEADERIMG<styles.content.get
HEADERIMG.select.where = colPos= 1
}
How to do that?
I don´t think having multiple images with the same id on a page is correct HTML, as ID´s should always be unique per page. Use the class attribute instead. With the following code you can specify image params.
tt_content.image.20.1.params = class="my-class" id="bg-img"
I'm using ireport 3.7.6. i have field images in the databases.i want to use the field images to display the images from server. When i put $F{images} in images expression. The images not appear in my report.
Anyone know about this?. Please help me.:(:(
set field type to java.io.InputStream
and image expression type to java.awt.Image it will work..