Comments (2)
Using Twig, this could be achieved with the attr
filter:
{{ craft.embeddedAssets.get(element.embeddedAsset.one()).html|attr({ loading: 'lazy' }) }}
It makes sense for this to be an in-built option for the embedded asset getIframeCode()
method, though, so will look at adding that soon.
from craft-embedded-assets.
Just released Embedded Assets 3.0.4 with a second parameter for getIframeCode()
for adding attributes to iframes, in the format attribute
or attribute=value
(see the templating documentation for an example).
from craft-embedded-assets.
Related Issues (20)
- Feature request: different caching driver HOT 3
- Feature request: refresh instagram embeds in background (jobs) HOT 2
- Vimeo "dnt=1" parameter double-encoded HOT 1
- Move refresh function to service and add more options to call HOT 2
- Craft 4 support HOT 2
- Asset summary stuttering when uploading Vimeo video in Craft 4 HOT 3
- Embedded Asset not saving to subfolder HOT 2
- Feature request: disable refreshing of Instagram embeds by config HOT 2
- Instagram page not foound HOT 1
- Add rules for embedded asset auto-refreshing
- Graph Query Error: Something went wrong processing the GraphQL request. HOT 1
- Cannot save the assets with non admin user that has save Asset permission
- Adding an asset fails with server error and Corrupted path detected - possibly due whitespace in title HOT 4
- How to remove frameborder attribute from iframe? HOT 3
- The "Uploaded By" field is empty or does not exist after adding the embedded asset HOT 1
- Type Error HOT 1
- Where do I set the embedded data? HOT 1
- Sk
- getVideoId not working with Dailymotion HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from craft-embedded-assets.