0

With Drupal 7 I'm trying to use Pathauto to create aliases for images that we upload. The images are renamed with File Field Paths. An example of what I'm trying to do

What I'm trying to do

  • Image content type
  • Has an Image Field (CCK), field_image
  • Upload image with content type (example.jpg)
  • example.jpg is renamed to Ax54jk.jpg (File Field Paths)
  • mysite.com/node/523 is altered to mysite.com/Ax54jk (Pathauto)

I set a pattern for the Image content type of [node:field_image] which appears to yield httpmysitecomsitesdefaultfilesAx54jkjpg

So instead of creating http://mysite.com/Ax54jk, it creates http://mysite.com/httpmysitecomsitesdefaultfilesAx54jkjpg

While I was going for a unique URL, this is a bit more unique than I'd hope. Does anyone know how to accomplish what I'm looking to do?

2
  • 1
    You can use [node:field-image:file] but it will generate Ax54jkjpg.
    – kalabro
    Dec 19, 2012 at 8:00
  • Thank you, that's a lot better. I may end up creating a simple module to orchestrate this with other modules.
    – Kirk
    Dec 19, 2012 at 15:01

1 Answer 1

0

The unfortunate answser is that Pathauto does its deed after File Field Paths. A custom solution will be needed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.