Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-04-17 13:09:34
- willmcclellan`
- New Member
- Registered: 2008-04-17
- Posts: 6
Problem assigning images to articles
Right, i have a problem in referencing article images. When i upload the images (using textpattern) i give them a name so i can use that name when assigning an image to an article.
The problem is the image doesn’t show when that name is used (e.g. test.jpg), but does work when you use the textpattern id (e.g. 5). I have tried all sorts of different variations in the article image field, such as image/test or images/test.jpg and even the the full URL but the image still wont show!
The image was in a category so i took it out of that category to see if it was the problem but still no luck. Also, the image is stored on the server under its id (5.jpg) and not the name i gave it – is this correct? It would be better if it was stored under its name.
Thanks, Will
Offline
#2 2008-04-17 13:27:11
- masa
- Member
- From: Asturias, Spain
- Registered: 2005-11-25
- Posts: 1,091
Re: Problem assigning images to articles
willmcclellan` wrote:
The problem is the image doesn’t show when that name is used (e.g. test.jpg), but does work when you use the textpattern id (e.g. 5).
That’s how the article image field works: you need to use the id, nothing else. <Edit: which as it turned out later is not true!
You could install Mary’s upm_image_popper to make locating the image a bit easier, but it’s still going to be referenced by its id.
Also, the image is stored on the server under its id (5.jpg) and not the name i gave it – is this correct? It would be better if it was stored under its name.
Again this is how it works: Txp assigns its own internal names. That shouldn’t pose any problems since you use Txp to manage your images and usually don’t work on the server files directly.
Last edited by masa (2008-04-17 23:54:26)
Offline
#3 2008-04-17 14:32:15
- willmcclellan`
- New Member
- Registered: 2008-04-17
- Posts: 6
Re: Problem assigning images to articles
O rite. According to the documentation you can give it a name and then reference it in the article image field (http://textpattern.net/wiki/index.php?title=Write_Subtab#Article_Image_.282.5.29).
I’ve read the same thing in the FAQ (http://textpattern.com/faq/77/images-are-broken-on-certain-pages) as well, otherwise what would be the point in giving the image a name?? I thoguht somewhere in the database the id would be referenced with the name you chose while uploading the image and it could be retrieved that way.
Offline
#4 2008-04-17 14:37:40
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Problem assigning images to articles
You should be able to use the image name, but it’s possible that you have to enter the full url.
Sorry, I overlooked that you already tried this.
Last edited by els (2008-04-17 14:39:44)
Offline
#5 2008-04-17 14:49:31
- masa
- Member
- From: Asturias, Spain
- Registered: 2005-11-25
- Posts: 1,091
Re: Problem assigning images to articles
willmcclellan` wrote:
O rite. According to the documentation you can give it a name and then reference it in the article image field (http://textpattern.net/wiki/index.php?title=Write_Subtab#Article_Image_.282.5.29).
LOL, I learn something new every day: I had no idea that names or urls should work! Thanks for pointing that out.
Anyway, since the image popper uses the id, I assumed that’s what you need to do. I usually have the write- and images tabs open in separate browser tabs, so the moment I’m done uploading an image I know its id and can go back to the write tab to fill it in the respective field. That’s much quicker than upm_image_popper for those cases.
The image names are handy for instance to control the sort order in gallery plugins such as rss_thumbpop
Offline
#6 2008-04-17 15:00:55
- willmcclellan`
- New Member
- Registered: 2008-04-17
- Posts: 6
Re: Problem assigning images to articles
Haha i try to make it my mission to learn something new everyday. I never thought of having the tabs open in different browser tabs, that would speed my work up somewhat instead of switching between them and it would be easy to locate the image id’s that way.
I would prefer to be able to use the names though but seen as their stored under there id’s anyway it’s a bit pointless – It would be so much better if they were stored under their names just to be less confusing
Offline
#7 2008-04-17 15:25:36
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Problem assigning images to articles
willmcclellan` wrote:
I would prefer to be able to use the names though but seen as their stored under there id’s anyway it’s a bit pointless – It would be so much better if they were stored under their names just to be less confusing
Well if you don’t need the id’s, you can just ftp them to your image directory instead of uploading them through the images tab. And if you can do without upm_img_popper, you can use the names in the article image field.
Offline
#8 2008-04-17 23:47:19
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Problem assigning images to articles
You enter: full url (http://yourdomain.com/path/to/image.jpg), name (image.jpg) or id #. If name doesn’t work, I would suggest using tag trace to see what’s happening.
Offline
Re: Problem assigning images to articles
Isn’t the name of the image 1.jpg or 2.jpg and not the name you give it? Maybe this is where the confusion lies.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#10 2008-04-18 03:34:32
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Problem assigning images to articles
No, it is the name you give it in the Txp interface.
Offline
#11 2008-04-18 11:12:47
- willmcclellan`
- New Member
- Registered: 2008-04-17
- Posts: 6
Re: Problem assigning images to articles
I’m not sure what Textpattern is supposed to save the image under on the server, but it is definately saving it under it’s id like Matt says (e.g. 1.jpg, 2.jpg)…Is this wrong? Ive tried the full URL and the just image.jpg, but neither work.
Offline
#12 2008-04-18 11:24:18
- masa
- Member
- From: Asturias, Spain
- Registered: 2005-11-25
- Posts: 1,091
Re: Problem assigning images to articles
The server names look correct.
I would give a tag trace a try as Mary suggested.
Offline