sonata_media.yml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. #
  2. # more information can be found here http://sonata-project.org/bundles/media
  3. #
  4. sonata_media:
  5. db_driver: doctrine_orm # | doctrine_mongodb
  6. default_context: default
  7. contexts:
  8. default: # the default context is mandatory
  9. download:
  10. mode: http # X-Sendfile | http
  11. providers:
  12. - sonata.media.provider.dailymotion
  13. - sonata.media.provider.youtube
  14. - sonata.media.provider.image
  15. - sonata.media.provider.file
  16. - sonata.media.provider.vimeo
  17. formats:
  18. small: { width: 100, quality: 100}
  19. big: { width: 970 , quality: 100}
  20. course:
  21. providers:
  22. - sonata.media.provider.dailymotion
  23. - sonata.media.provider.youtube
  24. - sonata.media.provider.image
  25. - sonata.media.provider.file
  26. - sonata.media.provider.vimeo
  27. formats:
  28. small: { width: 100, quality: 100}
  29. big: { width: 970 , quality: 100}
  30. news:
  31. providers:
  32. - sonata.media.provider.dailymotion
  33. - sonata.media.provider.youtube
  34. - sonata.media.provider.image
  35. formats:
  36. abstract: { width: 100, quality: 100}
  37. wide: { width: 820, quality: 100}
  38. sonata_collection:
  39. providers:
  40. - sonata.media.provider.image
  41. formats:
  42. preview: { width: 100, quality: 100}
  43. wide: { width: 820, quality: 100}
  44. sonata_category:
  45. providers:
  46. - sonata.media.provider.image
  47. formats:
  48. preview: { width: 100, quality: 100}
  49. wide: { width: 820, quality: 100}
  50. user_image:
  51. providers:
  52. - sonata.media.provider.image
  53. formats:
  54. small: { width: 100, quality: 100}
  55. big: { width: 970 , quality: 100}
  56. cdn:
  57. # define the public base url for the uploaded media
  58. server:
  59. path: %sonata_media.cdn.host%
  60. filesystem:
  61. # define where the uploaded file will be stored
  62. local:
  63. directory: %kernel.root_dir%/../web/uploads/media
  64. create: true
  65. providers:
  66. # ...
  67. file:
  68. # the resizer must be set to false, otherwhise this can delete icon files from the fs
  69. resizer: false
  70. image:
  71. thumbnail: sonata.media.thumbnail.format # default value
  72. # thumbnail: sonata.media.thumbnail.consumer.format # can be used to dispatch the resize action to async task
  73. # thumbnail: sonata.media.thumbnail.liip_imagine # use the LiipImagineBundle to resize the image
  74. vimeo:
  75. thumbnail: sonata.media.thumbnail.format # default value
  76. # thumbnail: sonata.media.thumbnail.consumer.format # can be used to dispatch the resize action to async task
  77. # thumbnail: sonata.media.thumbnail.liip_imagine # use the LiipImagineBundle to resize the image
  78. youtube:
  79. thumbnail: sonata.media.thumbnail.format # default value
  80. # thumbnail: sonata.media.thumbnail.consumer.format # can be used to dispatch the resize action to async task
  81. # thumbnail: sonata.media.thumbnail.liip_imagine # use the LiipImagineBundle to resize the image
  82. dailymotion:
  83. thumbnail: sonata.media.thumbnail.format # default value
  84. # thumbnail: sonata.media.thumbnail.consumer.format # can be used to dispatch the resize action to async task
  85. # thumbnail: sonata.media.thumbnail.liip_imagine # use the LiipImagineBundle to resize the image
  86. pixlr:
  87. enabled: true
  88. referrer: App
  89. resizer:
  90. simple:
  91. # mode: outbound
  92. mode: inset
  93. #
  94. # The LiipImagineBundle can be used if you want to convert on demand an image
  95. # to a specific format. (ie a controller render the file)
  96. # more information can be found here : https://github.com/liip/LiipImagineBundle
  97. #
  98. #liip_imagine:
  99. # filter_sets:
  100. #
  101. # # this configuration match the sonata_media configuration format definition
  102. # sonata_product_preview:
  103. # quality: 75
  104. # controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
  105. # filters:
  106. # thumbnail: { size: [100, 100], mode: outbound }
  107. #
  108. # sonata_product_small:
  109. # quality: 75
  110. # controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
  111. # filters:
  112. # thumbnail: { size: [200, 100], mode: outbound }
  113. #
  114. # sonata_product_large:
  115. # quality: 75
  116. # controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
  117. # filters:
  118. # thumbnail: { size: [600, 100], mode: outbound }
  119. #
  120. # news_abstract:
  121. # quality: 75
  122. # controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
  123. # filters:
  124. # thumbnail: { size: [100, 100], mode: outbound }
  125. #
  126. # news_wide:
  127. # quality: 75
  128. # controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
  129. # filters:
  130. # thumbnail: { size: [820, 100], mode: outbound }
  131. #
  132. # sonata_collection_preview:
  133. # quality: 75
  134. # controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
  135. # filters:
  136. # thumbnail: { size: [100, 100], mode: outbound }
  137. #
  138. # sonata_collection_wide:
  139. # quality: 75
  140. # controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
  141. # filters:
  142. # thumbnail: { size: [820, 100], mode: outbound }
  143. #
  144. # sonata_category_preview:
  145. # quality: 75
  146. # controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
  147. # filters:
  148. # thumbnail: { size: [100, 100], mode: outbound }
  149. #
  150. # sonata_category_wide:
  151. # quality: 75
  152. # controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
  153. # filters:
  154. # thumbnail: { size: [820, 100], mode: outbound }
  155. #
  156. # default_small:
  157. # quality: 75
  158. # controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
  159. # filters:
  160. # thumbnail: { size: [100, 100], mode: outbound }
  161. #
  162. # default_big:
  163. # quality: 75
  164. # controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
  165. # filters:
  166. # thumbnail: { size: [820, 70], mode: outbound }
  167. # Enable Doctrine to map the provided entities
  168. doctrine:
  169. orm:
  170. entity_managers:
  171. default:
  172. mappings:
  173. ApplicationSonataMediaBundle: ~
  174. SonataMediaBundle: ~