Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dav 44 posts 69 karma points
    Oct 12, 2009 @ 16:50
    Dav
    0

    Disable thumbnailing?

    First of all let me say hello to all of you umbracoholics :-) This and the old forum has been most helpful in solving various issues already!

    However, I've been battling with this particular bugger for a day now and still haven't been able to find solutions on either the old or the new forum.

    The issue. My users wish to upload png images and be able to scale them to a desired size in TinyMCE. No big deal one would think but it turns out to be quite tricky! Transparency shows up fine in TinyMCE, as it uses width and height properties on the source media file. However, when published, the png gets automatically converted to jpg of the specified size, discarding transparency along the way and substituting it for stylish black :-)

    What we were thinking of is using ImageGen instead. So we specified eg. "/umbraco/ImageGen.ashx?image=/media/9170/wikisource-logo.png&width=200" as image source in the properties. Hit save & publish: TinyMCE replaces the "&width" with "&width"... And when we hit save & publish again, we automagically get the original src back, with imagegen discarded in a puff of .net smoke.

    Since images are not horribly big compared to their desired size, we were thinking along the "disable automatic thumbnailing" lines. But we could not find such an option in Umbraco.

    Another solution would be creating a CSS style that would reduce image width, and let users apply it within TinyMCE. While this works, tiny does not seem to be picking this up, and unintuitively displays the full size image...

     

    All in all, we now have no clue how to enable users to do what they want, with paths to all possible solutions terminated with some limitations. Is there something we're missing here? Have any of you encountered similar problems? Telling users to use Photoshop is not an option unfortunately :-)

  • dandrayne 1138 posts 2262 karma points
    Oct 12, 2009 @ 18:08
    dandrayne
    0

    Hi there

    This appears to be a bug, and should be added to codeplex.

    Having said that, there may be other ways to work around this.  I'd never recommend clients try to scale images inside the editor as the quality invariably suffers.  You could however do one of the following (there may be more options)

    • Add a class to the image via the styles dropdown that will use css to resize the original instead of scaling the image using the editor
    • Create a macro that will allow picking images and setting dimensions
    • Using one of the image cropper packages to create the correctly sized images

    None of these are ideal however.  Add the bug to codeplex and I'll certainly vote it up.  Also, someone else may have a way to disable this behaviour.

    Dan

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Oct 12, 2009 @ 23:42
    Morten Bock
    0

    I think that I would also go with the macro option. You could probably even enable rendering of the macro in the editor, so that the image is still visible.

  • Dav 44 posts 69 karma points
    Oct 15, 2009 @ 10:29
    Dav
    0

    Just to recap the subject... But first some background! Our users wanted to be able to add pngs into a table. So what we came up with was a new document type (say 'LogoItem'), and an XSLT that loops over all the child nodes of a page, and generates imagegen links resized to the user's desire (LogoWidth and LogoHeight are properties of the parent logo node).

    We also enabled macro rendering in the editor to give users that all important feedback and prevent them stretching imagination too much.

    Works like a treat, and is even easier to use and control than adding pngs manually. Having said that, will also add a bug to codeplex, cos if it wasn't for the table bit, we'd be properly stuck to this day :-)

Please Sign in or register to post replies

Write your reply to:

Draft