Comments (5)
Thanks for the detailed explanation @rpkoller. If I'm understanding correctly, it sounds like you're proposing an API that could be used by theme authors to expose a UI in the admin for managing sets of images, which could then be used for building responsive image sets.
- Do I have the basic idea right?
- Could a theme author use current WordPress functions to provide this functionality or would this require modifications to core?
from wp-tevko-responsive-images.
- Roughly yes. Showing off and make ALL sets accessible inside the admin interface as soon they are defined inside the functions.php i've ruled out until now since i've thought that things should kept simple in the front end. In my initial proposal only the default set ( the initial sizes or the changed ones should have been shown). But for the further tweaking it would be handy and convenient if also the other defined sets would show up. Might be confusing if only the default set would show up in the backend and the rest does not even if you it set up inside the functions.php. But on the other hand i have to admit, for the regular enduser, it might be confusing too if a theme author has set several sets and the user now sees those sets instead of the regular three sizes he or she is used to. But i think it would be useful nevertheless as soon as any set is registered that it is displayed inside the media preferences anyway - would be a more consequent move.
And it wouldn't be just managing and defining sizes alongside the display in the media preferences. You would also need a select box for the image set in the media edit screen that you are able to assign a set of sizes to a single image. And in the end WordPress has to replace the default size for an image with the appropriate sizes necessary reflecting the set image set (or update). - With the current WP functions you are only able to create the described "default set" half ways, which means unset the default three sizes and replace them with a set of image sizes you need. Which means you need to merge all sizes necessary for all sets into one. Which leads to the problem of too many unnecessary images i initially descibed. And also the size changes aren't reflected back to the media preferences. And anyway WordPress doesn't KNOW different image sets at all so far.
So to sum things up,a bit of underlying functionality is already there but i suppose there would be the need of a few modifications and extensions to the core. But in my humble opionen it would be more than benificial to have flexible responsive images managing functionality aside the orchestration with the present state of the plugin.
from wp-tevko-responsive-images.
What we cant do is add an image interface to the wordpress admin. I think that will only make the plugin more complicated while leading us further away from our original goal: default responsive images that work invisibly.
Whatever solution we come up with, it will have to be admin-less, while allowing theme developers to customize and improve as needed. We won't be able to cover every possible use case and that's okay
from wp-tevko-responsive-images.
@tevko yep would be fine with me too. The only necessary ui element in my suggested scenario would be the select element inside the media edit screen ( as soon as more than one image set would be defined inside the functions.php) so that the user can apply an image to another image set. That would be the most unobtrusive way i could imagine.
from wp-tevko-responsive-images.
Hey @rpkoller , while you've very interesting issue, we've determined it to be just a bit outside of the scope what we're trying to achieve with this plugin. Please continue to contribute, as we value your ideas and insight. For the time being however, we're going to close this and move on to more pressing issues
from wp-tevko-responsive-images.
Related Issues (20)
- `the_post_thumbnail()` not returning `srcset` attributes. HOT 2
- Function to output responsive images in themes HOT 1
- Should we increase the default of 'max_srcset_image_width'? HOT 1
- Update documentation of 'wp_get_attachment_image_sizes()'
- Incorrect inline documentation HOT 2
- Problem with filter deprecation notices HOT 1
- Test test_tevkori_filter_content_images() failing against WP nightlies HOT 2
- Full URL path to files HOT 1
- Add custom srcset + sizes values to post thumbnails? HOT 1
- Incorrect srcset for retina images in 3.1.0 HOT 1
- Image tags without ending slash are never made responsive. HOT 4
- wp_calculate_image_srcset(): Reduce accepted aspect ratio difference HOT 2
- Default theme image options can make test fail HOT 2
- Responsive images broken on edited/imported content HOT 1
- Update documentation about plugin features HOT 2
- Problem with WooCommerce images HOT 4
- Use custom sizes attribute with the_post_thumbnail HOT 5
- Backport WP 4.4.1 fixes. HOT 1
- Deprecate/remove calls to `_wp_upload_dir_baseurl()`
- Plugin compatibility with PHP 8.0 | Imagick 3.5.0 HOT 1
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 wp-tevko-responsive-images.