Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
webp
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
webp
Commits
9f44e5f3
Commit
9f44e5f3
authored
1 year ago
by
Luke Leber
Committed by
Martin Anderson-Clutz
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3260643
by Luke.Leber: Duplicate markup generated for core "webp" conversion image style
parent
9056c275
No related branches found
No related tags found
1 merge request
!22
Issue #3260643: Duplicate markup generated for core "webp" conversion image style
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
webp.module
+5
-0
5 additions, 0 deletions
webp.module
with
5 additions
and
0 deletions
webp.module
+
5
−
0
View file @
9f44e5f3
...
...
@@ -67,6 +67,11 @@ function webp_preprocess_responsive_image(&$variables) {
$webp
=
\Drupal
::
service
(
'webp.webp'
);
$webp_srcset
=
$webp
->
getWebpSrcset
(
$srcset_orig
);
// Skip generation if the original is already in webp format.
if
(
$srcset_orig
===
$webp_srcset
)
{
continue
;
}
// Create a new source pointing to the webp URL.
$webp_source
=
clone
$source
;
$webp_source
->
offsetSet
(
$srcset_attribute_key
,
$webp_srcset
);
...
...
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