I've got a collection of images which need to appear in various sizes through out the site, including in an image carousel, for which I'm using Views Slideshow.
Everything's coming together. The Media module provides an easy interface for the people who will be using it. Views has no problem getting the images. The carousel works brilliantly. The only thing is that images are sized wrong. So far as I can tell, the Formatter dropdown lets me choose an image style, but only a few presets (namely, "Link", "Preview", "Small", "Large", and "Original"). Any custom image styles I create are not shown. I have limited understanding of the purpose of the File Styles module, and tinkering with that hasn't helped.
So, what's populating the Formatter dropdown? How can I add my own "Formatters"?
Thanks for your assistance!
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | imagestyles.png | 11.67 KB | DanielF |
| formatters.png | 11.16 KB | DanielF |
Comments
Comment #1
damien tournoud commentedReassigning. I would like to know the answer too :)
Comment #2
merlinofchaos commentedI believe that's populated by imagecache presets.
Comment #3
DanielF commentedAre those supposed to be these? I've added my own, and they don't show up. Sorry, I'm not familiar with imagecache in the least. What is it that it does?
Comment #4
DanielF commentedI'm marking this unfixed, as I haven't actually been able to solve my problem yet.
Comment #5
oxyc commentedThere are some Media docs explaining this, and now with added diagrams! http://drupal.org/node/1092444
You can use the code snippet mentioned last to hook in your image styles as presets.
Comment #6
manu manuSubscribing, the hook mentioned in #5 didn't changed the formaters list for me.
Comment #7
Zero4ffect commentedI added the hook mentioned in #5 and confirmed that it's being processed but it did not appear to do anything for me either. Subscribing.
Comment #8
neurojavi commentedsubscribing
Comment #9
phoenix commentedI'm having the same issue. I don't see how I can add my own image styles...
Comment #10
neurojavi commentedI think #5 hook is not needed anymore. At least with last dev version of media module (april the 28th) which includes this issue #1086958: Switch from Media Entity to File Entity commit with a lot of changes to media module. In fact the styles modules is not a requirement now and you can use media without it (if you don't need any of the advanced features of styles module).
I've last media dev version and can see as formatters all file styles (the include now a file style for each image style) and image styles, so you can use them in two ways...
Comment #11
neurojavi commentedSorry, my last comment was about 1.x-dev version of styles module. I don't know the status of this issue in 2.x branch.
Comment #12
oxyc commented#6, #7 I recommend reading effulgentias post regarding changes to the media module.
- Are any error messages produced?
- What version are you using?
- Have you cleared your cache?
Comment #13
rootworkIs there a place this is being worked on, other than this issue? I assume "create your own (self-described "ugly") custom module hook" if you want to use image styles as presets isn't meant to be the final outcome.
In fact, I'm not entirely sure why one would bother creating image styles unless one were going to use them as presets. The contexts that I usually see them appear are in views (as with the OP) and field display settings of content types -- both places where they'd need to be presets to appear.
Comment #14
rootworkOops, I meant to re-open this as well. I don't see how this is fixed.
Comment #15
lloydpearsoniv commentedwell i hope does get fixed.
Comment #16
Scott J commentedPerhaps a duplicate of #1010958: Creating and applying image (or other file) styles is non-intuitive ?
Comment #17
rootworkYeah, I think it probably is. I subscribed over there.
Comment #18
manu manu@oxyc in #12:
Sorry for the delay & thanks for the pointer, very comprehensive.
I've got no error messages, using the latest dev version of each modules. Sure I'm clearing the cache each time (my fingers are typing "drush cc all" before I'm noticing it)
By the moment and waiting for another solution, I ended to use custom theme() in views field template:
Comment #19
aaron commentedFile Styles will create a new 'Preset' for each Image Style created. However, it does not currently automatically create a new File Style, and instead you need to go to admin/config/media/file-styles and add a new style from there, and select the new image style from the preset drop-down for images.
The whole thing needs some work to get it working more intuitive.
Comment #20
nedjoSee #1010958-50: Creating and applying image (or other file) styles is non-intuitive for a sample implementation of creating an image style and hooking it up to a file style in code.
Comment #22
pitxels commentedI always find this dead-end:
I don't have "file-styles" in Media
There are only these options in the d7 instances I have: