Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [assets]

Files managed by Craft, stored in physical folders or (with Craft Pro) on Amazon S3, Rackspace Cloud, and Google Cloud.

0
votes
0answers
10 views

Is there a way to reset the focal point in Craft?

As the question states. Is it possible to reset the focal point in the CMS? I cannot see any obvious setting? If not could this perhaps be a feature request for a reset focal point button?
0
votes
0answers
19 views

Broken Asset Previews/Transforms

The asset previews in my CP are displaying as broken, and certain image transforms on the front-end template are broken. If I preview a file in the Assets panel it displays fine, so it seems to be a ...
1
vote
0answers
9 views

Image Store Issue

Dear Craft Users/Developers We have inherited a customer on our server platform using CraftCMS 2.7.4. They had their site before moving to us hosted with images using Rackspace via the CraftCMS Pro ...
1
vote
1answer
30 views

Craft 3 - Moving assets between folders causes apache connection to max out

In Craft 3, I keep running into an issue when I try to move a large amount of files (around 200) by dragging and dropping from my “Holding” folder into a “Live” folder using Craft Assets section. Both ...
0
votes
0answers
19 views

Cache Busting: Server not ignoring Static Assets Version Timestamp String?

I'm trying to get cache busting working using Andrew's amazing scaffold for Craft CMS. Craft is requesting the timestamped assets but they are not loading. For example, the stylesheet is requested ...
0
votes
1answer
46 views

Can't link to entries or assets via a Redactor field

When using a Redactor field for a section, I can’t upload assets or link to entries. I just get an empty modal with no ability to select a section or asset folder. Thoughts on what I’m doing wrong? [...
1
vote
1answer
15 views

Route directly to an S3-hosted asset?

I have a multi-site Craft install. I'd like to offer the ability for each site to upload an icon that will be used for favicons. I noticed a lot of 404s for both /favicon.ico and /apple-touch-icon....
1
vote
1answer
20 views

Amazon S3 Images not showing up in Assets

I'm developing locally and adding images to my Amazon S3 bucket. I have the same connection to the bucket on my remote environment. On my local environment, I can see the images I've uploaded, but on ...
1
vote
1answer
27 views

How do I delete an asset with module or plugin

I'm trying to clean-up the assets in a specific folder that aren't being used at all, i.e. aren't related to anything. I got the list O.K. just using this $assets = Asset::find()->volume('artists'...
1
vote
1answer
44 views

How to browse uploaded assets on the front end?

I have a frontend entry form which included a file field to upload files to the entry. All works fine. I even have a delete function to remove individual uploaded files from the entry. The problem ...
2
votes
1answer
21 views

ImageOptimize not using image url specified in my multi-environment setup and my volume config

When I output my ImageOptimize field in the template, my images are not showing up. If you inspect the image url, it's missing a folder name I'm specifying as part of the url in my multi-environment ...
1
vote
1answer
44 views

Assets page “An unknown error occurred”

I'm suddenly unable to load my site's assets page. All of my asset sources are local, and loading the main assets page or any source folder or subfolder results in "An unknown error occurred." being ...
0
votes
1answer
35 views

Displaying related image assets from another section with twig

I have a site that shows upcoming football matches in a table, and I would like to include the clubs' logos next to each club name. I have the following sections and entry types, both generated using ...
1
vote
1answer
21 views

Is it possible to search an asset filename stored on a remote Amazon S3 volume?

I'm successfully using the .search element attribute to search asset filenames stored locally. {% set mediaExists = craft.assets.folderId('6').search('filename:' ~ vLogID|slice(0, 5)) %} Is it ...
1
vote
2answers
117 views

Craft 3 Plugin Development: Add CSS and JS File to Frontend Templates

How do I add js and css files to frontend page loads via a plugin? I did reference this issue: Can a plugin add JS or CSS to the control panel? but that is for Craft 2. Reading the docs here: https:/...
0
votes
1answer
69 views

Craft 3 - Save new Entry with Relations (Categories/Assets)

i simply can not get my "job" done. I try to create a plugin for Craft, a simple one. It reads some date and should create new entries out of this data. First i stuck on a stupid save-mistake, someone ...
0
votes
0answers
46 views

Large file upload, 500 server error

We've a Craft 3 site hosted with Digital Ocean (Serverpilot set-up) with the DNS routed through Cloudflare. The client has experienced issues uploading large ZIP files to (c140MB), returning a 413 ...
0
votes
1answer
71 views

Craft 3 auto-creates sub-folders in assets. How can I prevent this?

I use Google storage for photos. The Google storage volume is mapped to a bucket's subfolder. Unfortunately these appear as subfolders in assets, along with a set of repeated folder structure. I did ...
2
votes
1answer
24 views

Multiple Asset source question

I'm creating a new Craft 3 site and migrating a lot of content from a wordpress setup. I'm wondering if it is better to separate assets into more sources - thus reducing the number of files per ...
1
vote
1answer
21 views

Sideloading an image from a function in a plugin

I need to be able to side load an image and attach to an entry. My image is coming from an external url... such as http://someplace.com/image.jpg - i can store this in a temporary file so its locally ...
2
votes
1answer
37 views

How to rename filename of asset before (or after) upload in Craft 3

I want to change the filename before the file is stored, to prevent ugly, long and weird filenames uploaded by users. I've found an example for Craft 2, but because of the changes for events I can't ...
1
vote
1answer
19 views

How can I fix Image Exception error when uploading image via front-end form while Preparse plugin enabled?

I'm not sure if the issue is with Craft 3, the Preparse plugin, or me, so I'm posting here first. I have a front-end form that includes an Assets field used to upload images. The entry type contains ...
1
vote
1answer
57 views

How can I rename an asset file on upload when an entry is saved (Craft 3)?

I have an entry type that includes an Assets field. When this entry is created/saved via the CP or a front-end form, I want to rename the Asset file as follows: Entry's author id. E.g: 148 01, 02, 03 ...
0
votes
1answer
32 views

Update Asset Indexes gives “getFileList() is not implemented”

Thank you in advance for any tips on this. Barely-related-background: I made a mistake on my development machine. In gparted, I chose "ignore" instead of "cancel". This is called 'choosing poorly'. ...
1
vote
1answer
31 views

Push/Add asset to Entry by asset filename

I have spreadsheet that i'm parsing and I have available to me a Entry ID and the Asset filename. Can I add the asset to the entry by the filename? Im targeting the product entry with: $product = ...
1
vote
1answer
25 views

API - Update Asset Volume

Im trying to figure out how to move asset(s) to a different volume. Also if I move it will that affect the entries that are using the asset? Here's what im using to target the asset: $resourceImage = ...
1
vote
1answer
26 views

Permissions needed to “edit image”?

What permissions do users need in order to access the "edit image" menu in assets? Some users can't access this, but I can't see a specific permission for this listed under: Settings > Users > User ...
0
votes
0answers
30 views

Custom plugin: asset fieldtype

I have a custom plugin that uses a custom field leveraging the elementSelect fieldtype to select an asset (which is then processed on submission via a custom service). However, when I select an asset ...
1
vote
1answer
78 views

Asset integration with Microsoft Azure Storage in Craft 3

I'm developing a site using the Craft 3 and I can't figure out how to connect assets with Microsoft Azure Storage. I found plugin for Amazon S3 but not available similar plugin for azure. Any help ...
1
vote
1answer
24 views

Is there any way to replace the asset programatically?

In the CP, when we upload an image with a same name, craft will ask if we wanna keep both or replace. So in plugin, is there any way to do the replace?
1
vote
1answer
22 views

Craft strips out parenthesis in file names.

Is there any way to allow () in asset file names (ex. file(1).txt)? Craft strips it out when it saves. The only way I've found is to change it via ftp and update asset indexes. I've set ...
5
votes
1answer
84 views

How to setup assets in multi site where each site should have its own assets?

I have a setup with multi sites that are separate domains. site-a.com site-b.com I would also like to have assets separate for each site, like so: site-a.com/images/picture1.jpg site-b.com/...
1
vote
1answer
35 views

Plugin development: how can I check if user has the permissions to delete only his own assets?

I have a front-end form where logged users can upload and delete their personal files. These users have the strict minimum permissions required to interact with this form. They can only Create, ...
0
votes
0answers
42 views

How to upload an image to an entry?

In front-end, I have a file input field with the name headerImage. <input type="file" class="form-control" name="profileImage" accept="image/*"> At the back-end, I do something like this: $...
1
vote
2answers
58 views

background-image CSS property: how to do it right with Craft?

My current code is: #header { background-image: url('{{ sitePath }}/assets/toxicomental/header.png'); height: 150px; } Still, I don't get the image showing. What do I do wrong?
1
vote
1answer
58 views

Pull all assets from a specific volume subfolder id

Is there a way to pull all assets from a volume subfolder id? {% set entries = craft.entries.section('pages').type('genealogy').search('pageType:stake') %} {% for entry in entries.all() %} {% if ...
1
vote
2answers
32 views

Assets metadata: Matrix required?

I'd like to add very basic metadata to assets (Alttext, Caption..) I noticed in volumes you can add custom field types – but they're not appearing when editing the entry. I found it can be edited in ...
3
votes
1answer
70 views

Temporary Uploads - disable?

When browsing the assets, there is a "Temporary Uploads" folder. What is it for? Can I disable/hide it?
0
votes
1answer
86 views

Asset (image) public URL does not work

I wanted to include some uploaded assets (images) in an entry. The .url property in twig outputs the proper URL, in my case: http://localhost/craftcms/web/image/photo-2017-04-02-16-20-53-1.jpg ...
2
votes
1answer
39 views

How to get second asset?

I have an entry with an asset field that has up to 3 assets in it. If I want to load just the second asset in my template code, what's the syntax for this? (can't find any references/examples)
1
vote
1answer
21 views

How to create a border + border colour field on an image

My first question here... maybe one of a few! I've inherited a Craft project recently and don't have much experience with it. I want to allow admin to set a border (and border color) whenever they ...
0
votes
0answers
19 views

JPG assets won't upload with image driver GD

I'm really not sure what's going on here. The server has GD extension installed as the image driver. I cannot install imagemagik, it's outside of my control. Image assets like .png and .gif upload ...
2
votes
1answer
38 views

How to exclude child elements when looping through categories?

I've got a few categories set up with a few child categories for each. Each one has assets (PDFs) assigned to them, by going into the assets, double clicking, and setting the category field there. So ...
3
votes
1answer
57 views

Moving Craft assets from one S3 bucket to another

I have the task of moving a large amount of assets ~50gb from one amazon s3 bucket to another on another AWS account. I've figured out how to copy the files via S3 COPY, but I'm just wondering will it ...
0
votes
0answers
35 views

I can access an asset filename, but not its URL

At first I was trying to use the one(), but it always told me the Object of class Craft\ElementCriteriaModel could not be converted to string So searching the documents, I found first(), and that ...
1
vote
1answer
28 views

How to display a featured image in the list of entries

I created a field which uploads an image, and I want it to display it for each of my entries inside my for loop. What's the code I should use to do it?
1
vote
1answer
16 views

How can I prevent CMYK image colours being shifted when importing into Assets?

When importing CMYK images into Assets the colour of the image can be shifted dramatically. Often giving a washed out look. How can I prevent this and ensure the image colours are as accurate as ...
0
votes
0answers
22 views

No preview on active list

I'm having an issue once I want to pick one asset from all the uploaded assets list, due to I'm not able to view the preview thumbnail. Edit feature doesn't work either. Here you have an screenshot: ...
1
vote
0answers
33 views

Find All Levels of Subfolders under Assets

I'm working with images in subfolders, several levels deep, under the Assets parent folder. -Assets --Dept_A ---Jan15 --Dept_B ---Jan15 ---Jan16 I've come across this code (below), but it only ...
0
votes
0answers
44 views

Asset Subfolder Access (By P&T) - Subfolders of Subfolders?

I'm developing my first site and am using the Asset Subfolder Access (By P&T) to restrict uploads to Assets and subfolders. As I have subfolders of subfolders, I was wondering if it is possible to ...