Home › Forums › Bug Reports › Mime Types not supported within Repeater
When using an Image type within a Repeater field, it no longer seems to be supporting the mime_types field. I have the capability added to be able to upload SVG’s to my media library, and when adding the svg to the mime_types field when not in a repeater, it seems to work perfectly. But when inside the repeater, for some reason it is telling me that only png, jpeg and jpg are supported even though I have clearly added svg to the mime_types field.
I don’t know what you mean by mime_types field. By default ACF does not support SVG images in image fields. Are you using a plugin or some code to enable this?
When you put an Image field within a repeater, it seems that it no longer supports the mime_types.
Also, as I described in my earlier post, I know that ACF doesn’t support SVG’s by default. I have added the support to WordPress myself. The images are upload-able to my media library. That is not the issue.
The issue is that when I have an Image Field within a Repeater, the image field completely ignores the mime_types that I’ve passed to it and will not allow me to select an SVG that is already uploaded to my media library. It tells me that the File type must be png, jpeg or jpg.
When I have an Image Field NOT within a Repeater, it respects the mime_types field and allows me to select an SVG image.
“mime_types” field? Do you mean the “Allowed file types” field in the field settings?
I would need to see the code you are using to add this ability to maybe figure out why it’s not working in a repeater.
“mime_types” field is the field in the Code version for “Allowed file types” in the GUI of ACF, yes.
Without code I really can’t do anything. I need to know how you are adding this to the fields and how you are trying to add it to repeater sub fields in order to attempt to figure out why it is not working on repeater fields.
I actually just figured it out. It was because my key wasn’t unique enough.
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.