Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
83b567c9
Commit
83b567c9
authored
Mar 9, 2013
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1937140
by ACF: Convert image_jpeg_quality() to cmi.
parent
224b3c98
No related branches found
No related tags found
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
core/modules/image/config/image.settings.yml
+1
-0
1 addition, 0 deletions
core/modules/image/config/image.settings.yml
core/modules/image/image.install
+1
-0
1 addition, 0 deletions
core/modules/image/image.install
core/modules/system/image.gd.inc
+3
-2
3 additions, 2 deletions
core/modules/system/image.gd.inc
with
5 additions
and
2 deletions
core/modules/image/config/image.settings.yml
+
1
−
0
View file @
83b567c9
preview_image
:
core/modules/image/sample.png
allow_insecure_derivatives
:
false
jpeg_quality
:
75
This diff is collapsed.
Click to expand it.
core/modules/image/image.install
+
1
−
0
View file @
83b567c9
...
...
@@ -176,5 +176,6 @@ function image_update_8001() {
function
image_update_8002
()
{
update_variables_to_config
(
'image.settings'
,
array
(
'image_style_preview_image'
=>
'preview_image'
,
'image_jpeg_quality'
=>
'jpeg_quality'
,
));
}
This diff is collapsed.
Click to expand it.
core/modules/system/image.gd.inc
+
3
−
2
View file @
83b567c9
...
...
@@ -37,7 +37,7 @@ function image_gd_settings() {
'#description'
=>
t
(
'Define the image quality for JPEG manipulations. Ranges from 0 to 100. Higher values mean better image quality but bigger files.'
),
'#min'
=>
0
,
'#max'
=>
100
,
'#default_value'
=>
variable_get
(
'image_
jpeg_quality'
,
75
),
'#default_value'
=>
config
(
'image.settings'
)
->
get
(
'
jpeg_quality'
),
'#field_suffix'
=>
t
(
'%'
),
);
...
...
@@ -296,7 +296,8 @@ function image_gd_save(stdClass $image, $destination) {
return
FALSE
;
}
if
(
$extension
==
'jpeg'
)
{
$success
=
$function
(
$image
->
resource
,
$destination
,
variable_get
(
'image_jpeg_quality'
,
75
));
$quality
=
config
(
'image.settings'
)
->
get
(
'jpeg_quality'
);
$success
=
$function
(
$image
->
resource
,
$destination
,
$quality
);
}
else
{
// Always save PNG images with full transparency.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment