Comments (6)
tt_content.textmedia.settings.responsive_image_rendering {
sourceCollection {
10 {
width = 1280m
srcset = 1280w
}
20 {
width = 960m
srcset = 960w
}
30 {
width = 720m
srcset = 720w
sizes = (min-width: 1025px) 660px
}
40 {
width = 640m
srcset = 640w
}
50 {
width = 360m
srcset = 360w
}
60 {
width = 320m
srcset = 320w
sizes = calc(100vw - 30px)
}
}
layoutKey = srcset
}
This is the actual configuration of this website: http://www.elisenhoehe.de/
You're welcome :)
from fluid-styled-responsive-images.
I don't really understand the problem. But one thing is important to know. The TypoScript configuration of this extension is different than the one of css_styled_content.
Nevertheless, I tried your configuration with a 4k image. This extension renders a 360px image by default, just to be sure there is a small initial version in case one needs a polyfill.
Then these two sizes configurations are evaluated. As both do not define a width, the full with image is used. This is the result:
<img src="fileadmin/_processed_/csm_retina-image5_c2b3bf1a87.jpg" alt="" title="" srcset="fileadmin/user_upload/retina-image5.jpg, fileadmin/user_upload/retina-image5.jpg" sizes="">
So, in general, the extension works fine. It's just that the syntax is different. Hope I could help you.
from fluid-styled-responsive-images.
Hi Alexander,
thank you for answer.
Yes, but as the extension renders the two sizes based on full width, not on the size a editor has set in the appearance field of the content element, it's not possible to place images on the site with a certain size and render them in multiple sizes based on how big they should be displayed.
An example:
If an editor loads up an file with an original size of 2000x2000 px and sets the output size to 24x24 px it would be optimal to output two images: 24x24 and 48x48 (for retina).
The use case is to remain the possibility to set a size in the appearance field of a content element and render a "normal" and a retina image.
from fluid-styled-responsive-images.
Hi,
I think there are many things involved we need to separate.
- There is that default image of 360px width. That is a problem if you need to generate images that are smaller than that. It's something I didn't think about and I need to fix.
- This extensions does not work with a configuration where you leave out the width. If no width is provided, the 360px default image is used and the original file.
- If you set a width and/or a height for an image, that processing is done before the responsive images are generated and responsive images are only created if the source file is big enough. So, if you upload that 2000x2000 image and set it's width and height to 24px, it's first cropped and then the TS configuration is used to create the responsive images. From there on, you cannot create bigger images than the 24x24. What you can do is this:
Leave the original image untouched and use this configuration.
tt_content.textmedia.settings.responsive_image_rendering.sourceCollection {
normal.width = 24
retina.width = 48
}
Then, only the bug, mentioned in 1, applies.
Does that help?
from fluid-styled-responsive-images.
- Ok
- Ok, then i have to set a width for the SourceCollection in any case.
- Ok, that helps to understand how it works. I think i have to rethink my responsive image concept with fluid_styled_content. I think i should disabled the width/height fields in the CE and just render different resolutions based on each image. Probably it should also set the sizes attribute in the img-tag...
As you have removed a default config in the extension can you recommend a config to use? How do you use it?
Thank you for your answers and the development!
from fluid-styled-responsive-images.
I will close this issue now. If you need any further help, feel free to contact me.
from fluid-styled-responsive-images.
Related Issues (20)
- Make default image with 360px width optional HOT 1
- What i am missing? HOT 2
- no responsive image is generated HOT 28
- New release please HOT 4
- Problem with jpg image size of the src image HOT 8
- Option to enable rendering of original size as biggest size
- Aus einem 25 KB Bild wird eine über 1 MB große Datei HOT 2
- TYPO3 Version 8 HOT 3
- Fluid f:image and srcset HOT 11
- f:media within Mask HOT 8
- LTS 8: Backend image editor crop settings are ignored HOT 3
- Image file size PNG HOT 2
- Alt & title arguments of the media viewhelper are not respected
- 8LTS: Don't touch TCA in ext_tables.php HOT 1
- Use typo3/cms-core as dependency HOT 2
- [9.5 LTS] class="image-embed-item" HOT 1
- Composer restricts installation of typo3/cms HOT 3
- ignores `GFX/processor_allowUpscaling` = false
- Wrong image width
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 fluid-styled-responsive-images.