ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Image not showing

February 13, 2011 4:43pm

Subscribe [4]
  • #1 / Feb 13, 2011 4:43pm

    DorinV

    38 posts

    Hi Guys,

    My problem is that I’m getting the image URL instead of the image.<img >
    http://dorinvancea.com/photography/

    For some reasons EE is not recognising that custom field {homeimg} as an image even though the Field Type is File > File Type:Image

    I can see the thumbnail and full image in the file manager.

    My code is:

    {exp:channel:entries channel="post" limit="5" orderby="date" sort="desc" dynamic="on" paginate="bottom" paginate_type="field"}
    <div class="image">{homeimg}</div>
    {/exp:channel:entries}

    Server Path to Upload Directory: /home1/dorinvan/public_html/photography/website/ee_uploads/
    URL of Upload Directory: http://dorinvancea.com/photography/website/ee_uploads/
    Allowed File Types: Images Only
    ee_uploads has 777 file permission

    Default HTML Buttons: [![Link:!:http://]!]

    Am I doing something wrong ... ?

    Thanks !

  • #2 / Feb 13, 2011 8:13pm

    mz91184

    100 posts

    I am pretty sure getting the image url from a custom file field is default; someone correct me if I am wrong.

    Have you tired this?

    {exp:channel:entries channel="post" limit="5" orderby="date" sort="desc" dynamic="on" paginate="bottom" paginate_type="field"}
    <div class="image">{homeimg}</div>
    {/exp:channel:entries}

    I like to use the imgsizer plugin too (http://devot-ee.com/add-ons/image-sizer/).

  • #3 / Feb 14, 2011 4:01am

    DorinV

    38 posts

    Hi,

    Thank you for your reply. It is a fix but not exactly what I want.

    I’m using Pixel and Tonic Wygwam with EE and I don’t have “upload file” because of this problem.

  • #4 / Feb 14, 2011 9:01am

    webnology

    353 posts

    Hi Dorin,

    you insert an image inthe wygwam field, right? Or do you upload it in another custom field? It’s bit unclear to me.

    Michel

  • #5 / Feb 14, 2011 9:09am

    DorinV

    38 posts

    Hi Dorin,

    you insert an image inthe wygwam field, right? Or do you upload it in another custom field? It’s bit unclear to me.

    Michel

    I’m using a Field Type: File (image only) {homeimg}, but I would also use wygwam.

  • #6 / Feb 14, 2011 9:23am

    webnology

    353 posts

    If you’re using a custom field, then you’ll need to change your code as mz91184 showed.

    Michel

  • #7 / Feb 14, 2011 10:21am

    Sue Crocker

    26054 posts

    Thanks for the assist, webnology and mz91184. What you’re seeing is expected behavior, the easiest way to fix it is to use the code listed above by mz91184. Make sense?

  • #8 / Feb 14, 2011 11:09am

    DorinV

    38 posts

    Thank’s all for all your replies.

    Makes perfect sense but I was confused. On another website that I did I used it without including it in {homeimg} It worked perfectly without the “” /.
    After all, I think this is the purpose of Default HTML Buttons(img)... to insert the link automatic in <img >

    Thanks once again !

  • #9 / Feb 14, 2011 3:16pm

    Ingmar

    29245 posts

    Very glad to see you’re all set. Please post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases