You are here

function _social_core_set_image_quality in Open Social 8

Same name and namespace in other branches
  1. 8.2 modules/social_features/social_core/social_core.install \_social_core_set_image_quality()
  2. 8.3 modules/social_features/social_core/social_core.install \_social_core_set_image_quality()
  3. 8.4 modules/social_features/social_core/social_core.install \_social_core_set_image_quality()
  4. 8.5 modules/social_features/social_core/social_core.install \_social_core_set_image_quality()
  5. 8.6 modules/social_features/social_core/social_core.install \_social_core_set_image_quality()
  6. 8.7 modules/social_features/social_core/social_core.install \_social_core_set_image_quality()

Set image quality.

2 calls to _social_core_set_image_quality()
social_core_install in modules/social_features/social_core/social_core.install
Implements hook_install().
social_core_update_8007 in modules/social_features/social_core/social_core.install
Set higher jpeg quality instead of default 75%.

File

modules/social_features/social_core/social_core.install, line 469
Install, update and uninstall functions for the social_comment module.

Code

function _social_core_set_image_quality() {
  $config = \Drupal::service('config.factory')
    ->getEditable('system.image.gd');
  $config
    ->set('jpeg_quality', 90)
    ->save();
}