I realise this is probably something I'm doing wrong as I'm new to imagegen but on my production server when I use imagegen to create text for me it shows a blank image in ie? I am doing the following:
<img src='/ImageGen.ashx?text=news from test&FontSize=18&FontColor=727272&Font=/css/OptaThick.ttf' alt="news from test pro" />
This works on another hosting environment I have. Can anyone help out with a way to get this working or at least investigate what is going wrong?
Let's start with a bit of trial and error to narrow it down.
1) Grab the src="" from the img tag and drop it right into the url of your browser. Same result of no image shown?
It should behave the same either way but if the image appears in the url but not from the img tag:
Perhaps you need to url encode the text in the img tag?
Or, is the text too big for the image size? You can test by reducing the FontSize= to something quite small, maybe 8 instead of 18.
2) Assuming neither url or img tag is producing an image in IE (it does in other browsers, right?), simplify the imagegen.ashx request to just /ImageGen.ashx?text=Ed. Does that work?
That should get us started at least. Let me know how you get on.
Let's set the img tag aside for the moment... what do you get with the following as the url for your browser (changing localhost to whatever your site is using)?
Well, that's gonna be a problem for all browsers and not just IE ;)
It would seem that ImageGen isn't installed on the optapro.otbstudio.co.uk site. Can you double-check you've got ImageGen installed (see the Packages tree in the Developer section of Umbraco)? Or perhaps you installed ImageGen on a different site?
There are two lines to add to the web.config if they've been removed. But that alone shouldn't cause a 404 not found error when requesting /imagegen.ashx.
The PDF documentation explains how to do a manual installation (including the web.config entries that are needed).
After installing you should have the following, which is easy to double-check:
The Professional features are always active if you're running on localhost or any *.local domain, so feel free to install ImageGen on a local dev site and play with the pro features.
I am using imageGen and wonder if it can create similar thumbnail style to google and facebook! I mean, in Facebook they have all thumbnails similar size but you can see the image kept its proportion, it is like they only change the image width if wide or height if high and then they add it to a fixed size box
The &crop=resize parameter should give you the desired effect. Just be sure to specify the &width= and &height= of the final image size as well and it should work as you want.
Many thanks Doug, but it didnt work :( Do I need to have the proffessional version to do so? However, here is my single line of the code I am using inside xslt file
No images in ie on production server?
Hi,
I realise this is probably something I'm doing wrong as I'm new to imagegen but on my production server when I use imagegen to create text for me it shows a blank image in ie? I am doing the following:
<img src='/ImageGen.ashx?text=news from test&FontSize=18&FontColor=727272&Font=/css/OptaThick.ttf' alt="news from test pro" />
This works on another hosting environment I have. Can anyone help out with a way to get this working or at least investigate what is going wrong?
Thanks,
Ed
Hi, Ed,
Ahhh, good old IE :)
Let's start with a bit of trial and error to narrow it down.
1) Grab the src="" from the img tag and drop it right into the url of your browser. Same result of no image shown?
It should behave the same either way but if the image appears in the url but not from the img tag:
Perhaps you need to url encode the text in the img tag?
Or, is the text too big for the image size? You can test by reducing the FontSize= to something quite small, maybe 8 instead of 18.
2) Assuming neither url or img tag is producing an image in IE (it does in other browsers, right?), simplify the imagegen.ashx request to just
/ImageGen.ashx?text=Ed. Does that work?
That should get us started at least. Let me know how you get on.
cheers,
doug.
Hi Doug,
Thanks for you quick response. I fear it may be something I'm doing wrong as the image tags are:
<imgsrc='/ImageGen.ashx?text=ed2&FontSize=8' alt="who we work with" />
It looks like it's just using the src literally.
Thanks,
Ed
Let's set the img tag aside for the moment... what do you get with the following as the url for your browser (changing localhost to whatever your site is using)?
Or, any chance this is on a public site I can see?
Oh, and what version of IE are we talking about?
cheers,
doug.
I just get:
The resource cannot be found.
http://optapro.otbstudio.co.uk/imagegen.ashx?text=ed
Sorry for asking such basic questions.
Thanks,
Ed
Well, that's gonna be a problem for all browsers and not just IE ;)
It would seem that ImageGen isn't installed on the optapro.otbstudio.co.uk site. Can you double-check you've got ImageGen installed (see the Packages tree in the Developer section of Umbraco)? Or perhaps you installed ImageGen on a different site?
...hang in there, we'll get this sorted out.
cheers,
doug.
Thanks Doug,
Just checked and it is installed. However thinking about it, there is a possibility I've gone over the web.config. I guess this may affect things?
Thanks,
Ed
There are two lines to add to the web.config if they've been removed. But that alone shouldn't cause a 404 not found error when requesting /imagegen.ashx.
The PDF documentation explains how to do a manual installation (including the web.config entries that are needed).
After installing you should have the following, which is easy to double-check:
cheers,
doug.
Hi Doug,
Thanks so much for your help, the ashx file was missing! Not sure what happened there.
http://optapro.otbstudio.co.uk/imagegen.ashx?text=ed&font=/css/optathin.ttf
Works a treat, should have been using it on previous sites!!!
I'll look into the benifits of the pro package when I get time.
Thanks again,
Ed
Wahoo!
The Professional features are always active if you're running on localhost or any *.local domain, so feel free to install ImageGen on a local dev site and play with the pro features.
cheers,
doug.
Hi Doug,
I am using imageGen and wonder if it can create similar thumbnail style to google and facebook! I mean, in Facebook they have all thumbnails similar size but you can see the image kept its proportion, it is like they only change the image width if wide or height if high and then they add it to a fixed size box
Hi, MOthman,
The &crop=resize parameter should give you the desired effect. Just be sure to specify the &width= and &height= of the final image size as well and it should work as you want.
cheers,
doug.
Many thanks Doug, but it didnt work :( Do I need to have the proffessional version to do so? However, here is my single line of the code I am using inside xslt file
<img src="/imageGen.ashx?image={umbraco.library:UrlEncode(umbracoFile)}&width={$thumbWidth}&height={$thumbHeight}&crop=resize" alt="{title}" title="{title}" />
Am I doing anything wrong here?
Yes, the crop feature is a 'Pro' feature.
cheers,
doug.
is working on a reply...