You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's used to determine relative directory name to put cropped images (see above).
135
135
136
136
**Default value:** 'cropped'
137
137
138
-
###thumbs_dir###
138
+
###thumbs_dir###
139
139
140
140
It's used to determine relative directory name to put thumbnails (see above).
141
141
142
142
**Default value:** 'thumbnails'
143
143
144
-
###media_lib_thumb_size###
144
+
###media_lib_thumb_size###
145
145
146
146
It's used to determine thumbnails size in pixels (squares) used in media library.
147
147
148
148
**Default value:** 150
149
149
150
-
###upload_dir###
150
+
###upload_dir###
151
151
152
152
Dirname of your public directory. It's used to check thumb existence in thumb twig helper.
153
153
154
154
**Default value:** 'web'
155
155
156
-
###translation_domain###
156
+
###translation_domain###
157
157
158
158
Domain name for translations. For instance two languages are provided (en & fr). To override the domain name, change this parameter to whatever you want.
159
159
160
160
**Default value:** 'ComurImageBundle'
161
161
162
-
###gallery_thumb_size###
162
+
###gallery_thumb_size###
163
163
164
164
That's the image size in pixels that you want to show in gallery widget. Gallery widget will automaticaly create square thums having this size and show them in the gallery widget.
165
165
166
166
**Default value:** 150
167
167
168
-
###gallery_dir###
168
+
###gallery_dir###
169
169
170
170
That's the gallery directory name. The widget will store all gallery images in a specific directory inside the root directory that you will give when you will add the widget to your forms.
171
171
172
172
**For eg.** if you put 'uploads/images' as webDir when you add the widget, gallery images will be stored in 'uploads/images/*[gallery_dir]*'. This is added to make gallery use easier so you don't have to add new functions to your entities to get gallery dirs.
173
173
174
-
#Usage#
174
+
#Usage#
175
175
176
176
177
177
There are two widgets provided with this bundle. They both have exacly same config parameters.
@@ -318,15 +318,15 @@ That's all ! This will create a widget like on the following image when you will
318
318
319
319
Gallery images will be stored in uploadUrl / gallery_dir (default is gallery). Cropped images will be stored in uploadUrl / gallery_dir / cropped_dir (same as image widget) and thumbs in uploadUrl / gallery_dir / cropped_dir / thumb_dir with specified width. So if you pu
320
320
321
-
##uploadConfig##
321
+
##uploadConfig##
322
322
323
-
###uploadRoute (optional)###
323
+
###uploadRoute (optional)###
324
324
325
325
Route called to send uploaded file. It's recommended to not change this parameter except if you know exactly what you do.
326
326
327
327
**Default value:** comur_api_upload
328
328
329
-
###uploadUrl (required)###
329
+
###uploadUrl (required)###
330
330
331
331
Absolute url to directory where put uploaded image. I recommend you to create a function in your entity and call it like it's showen in the example:
332
332
@@ -352,80 +352,80 @@ Absolute url to directory where put uploaded image. I recommend you to create a
352
352
}
353
353
354
354
355
-
###webDir (required)###
355
+
###webDir (required)###
356
356
357
357
Url used to show your image in templates, must be relative url. If you created related functions as explained in uploadUrl section, then you can user getWebPath() function for webDir parameter.
358
358
359
-
###fileExt (optional)###
359
+
###fileExt (optional)###
360
360
361
361
Permitted image extensions.
362
362
363
363
**Default value:** '*.jpg;*.gif;*.png;*.jpeg'
364
364
365
-
###libraryDir (optional)###
365
+
###libraryDir (optional)###
366
366
367
367
Directory to look into for images to show in image library.
368
368
369
369
**Default value:** uploadUrl
370
370
371
-
###libraryRoute (optional)###
371
+
###libraryRoute (optional)###
372
372
373
373
Route called to get images to show in library. I recommend you to not change this parameter if you don't know exactly what it does.
374
374
375
375
**Default value:** comur_api_image_library
376
376
377
-
###showLibrary (optional)###
377
+
###showLibrary (optional)###
378
378
379
379
Set this to false if you don't want the user see existing images in libraryDir.
380
380
381
381
**Default value:** true
382
382
383
-
###saveOriginal (optional)###
383
+
###saveOriginal (optional)###
384
384
385
385
Use this parameter if you want to save original file's path (for eg. to show big image in a lightbox). You have to put property name of your entity and the bundle will use it to save original file path in it.
386
386
387
387
**Attention:** This parameter is disabled for gallery for instance. It will be implemented soon.
388
388
389
389
**Default value:** false
390
390
391
-
###generateFilename (optional)###
391
+
###generateFilename (optional)###
392
392
393
393
This parameter is used to generate an uniq file name. Setted to false, it will keep the original filename.
394
394
395
395
**Default value:** true
396
396
397
397
398
-
##cropConfig##
398
+
##cropConfig##
399
399
400
-
###minWidth (optional)###
400
+
###minWidth (optional)###
401
401
402
402
Minimum with of desired image.
403
403
404
404
**Default value:** 1
405
405
406
-
###minHeight (optional)###
406
+
###minHeight (optional)###
407
407
408
408
Minimum height of desired image.
409
409
410
410
**Default value:** 1
411
-
###aspectRatio (optional)###
411
+
###aspectRatio (optional)###
412
412
413
413
True to aspect ratio of crop screen.
414
414
415
415
**Default value:** true
416
416
417
-
###cropRoute (optional)###
417
+
###cropRoute (optional)###
418
418
419
419
Route to crop action. I recommend you to not change this parameter if you don't know exactly what it does.
420
420
421
421
**Default value:** comur_api_crop
422
422
423
423
424
-
###forceResize (optional)###
424
+
###forceResize (optional)###
425
425
426
426
If true, system will resize image to fit minWidth and minHeight.
427
427
428
-
###thumbs (optional)###
428
+
###thumbs (optional)###
429
429
430
430
Array of thums to create automaticly. System will resize images to fit maxWidth and maxHeight. It will put them in "uploadDir/cropped_images_dir/thumbs_dir/widthxheight-originalfilename.extension" so you can use included Thumb Twig extension to get them, ex:
431
431
@@ -437,7 +437,7 @@ Array of thums to create automaticly. System will resize images to fit maxWidth
437
437
438
438
**New in 0.2.2:** You can use 'useAsFieldImage' option to use this thumb as image field's preview (in your form you will see this thumb instead of original cropped image). Usefull when you have big cropped images.
0 commit comments